diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-07-23 11:16:18 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-07-23 11:16:18 +0000 |
commit | d9dd7a0d2cf22077e2441fd6396e07bb23de6fe5 (patch) | |
tree | 0f58be9d4e710bebba5d531972980d2c7f09b612 | |
parent | f2d9a9f5b7fac102fa5bbdd4095a5fb2d0420d45 (diff) | |
download | ffmpeg-d9dd7a0d2cf22077e2441fd6396e07bb23de6fe5.tar.gz |
minor user data reading bugfix
Originally committed as revision 4467 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/h263.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c index 7dc0467322..2e7a446b43 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -5742,13 +5742,11 @@ static int decode_user_data(MpegEncContext *s, GetBitContext *gb){ int ver, build, ver2, ver3; char last; - buf[0]= show_bits(gb, 8); - for(i=1; i<256; i++){ - buf[i]= show_bits(gb, 16)&0xFF; - if(buf[i]==0) break; - skip_bits(gb, 8); + for(i=0; i<255; i++){ + if(show_bits(gb, 23) == 0) break; + buf[i]= get_bits(gb, 8); } - buf[255]=0; + buf[i]=0; /* divx detection */ e=sscanf(buf, "DivX%dBuild%d%c", &ver, &build, &last); |