diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-05-06 13:15:05 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-05-06 13:15:05 +0000 |
commit | 7aaf3b98fcbee72e216435ad29360e58b6a18673 (patch) | |
tree | 7136af1ead5d4b9b3944fc41dab22cc71156b799 /libavcodec/h263.c | |
parent | e71a4f7425d61623e8c44dd9bd765246393761e3 (diff) | |
download | ffmpeg-7aaf3b98fcbee72e216435ad29360e58b6a18673.tar.gz |
there are divx5? encoded files without a userdata section but with b-frames :(
Originally committed as revision 446 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r-- | libavcodec/h263.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c index e20381da02..e654e19281 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -2747,7 +2747,6 @@ int mpeg4_decode_picture_header(MpegEncContext * s) { int time_incr, startcode, state, v; int time_increment; - int vol_control=-1; redo: /* search next start code */ @@ -2791,7 +2790,7 @@ int mpeg4_decode_picture_header(MpegEncContext * s) skip_bits(&s->gb, 8); // par_height } - if ((vol_control=get_bits1(&s->gb))) { /* vol control parameter */ + if ((s->vol_control_parameters=get_bits1(&s->gb))) { /* vol control parameter */ int chroma_format= get_bits(&s->gb, 2); if(chroma_format!=1){ printf("illegal chroma format\n"); @@ -3000,6 +2999,10 @@ int mpeg4_decode_picture_header(MpegEncContext * s) } s->pict_type = get_bits(&s->gb, 2) + I_TYPE; /* pict type: I = 0 , P = 1 */ + if(s->pict_type==B_TYPE && s->low_delay && s->vol_control_parameters==0){ + printf("low_delay flag set, but shouldnt, clearing it\n"); + s->low_delay=0; + } // printf("pic: %d, qpel:%d\n", s->pict_type, s->quarter_sample); time_incr=0; while (get_bits1(&s->gb) != 0) @@ -3109,9 +3112,8 @@ int mpeg4_decode_picture_header(MpegEncContext * s) } /* detect buggy encoders which dont set the low_delay flag (divx4/xvid/opendivx)*/ // note we cannot detect divx5 without b-frames easyly (allthough its buggy too) - if(s->vo_type==0 && vol_control==0 && s->divx_version==0){ - if(s->picture_number==0) - printf("looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag\n"); + if(s->vo_type==0 && s->vol_control_parameters==0 && s->divx_version==0 && s->picture_number==0){ + printf("looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag\n"); s->low_delay=1; } |