summaryrefslogtreecommitdiff
path: root/libavcodec/4xm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-08-13 01:05:19 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-08-13 01:05:19 +0000
commit9ac34d947ab26e113a48b10b6f66fc4bd7f1c107 (patch)
treed96eebaa18896663afd4ec1462836cf5fc575661 /libavcodec/4xm.c
parentcf786021a6c76a10f6e3453e01ac43c2fad28ac4 (diff)
downloadffmpeg-9ac34d947ab26e113a48b10b6f66fc4bd7f1c107.tar.gz
fix motion vectors for old version
Originally committed as revision 10096 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/4xm.c')
-rw-r--r--libavcodec/4xm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index b82797d493..d6f298b0f1 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -248,7 +248,10 @@ static void init_mv(FourXContext *f){
int i;
for(i=0; i<256; i++){
- f->mv[i] = mv[i][0] + mv[i][1]*f->current_picture.linesize[0]/2;
+ if(f->version)
+ f->mv[i] = mv[i][0] + mv[i][1] *f->current_picture.linesize[0]/2;
+ else
+ f->mv[i] = (i&15) - 8 + ((i>>4)-8)*f->current_picture.linesize[0]/2;
}
}