support forcing low_delay during decoding

Originally committed as revision 1150 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2002-11-02 18:47:51 +00:00
parent 326d40af06
commit 9f9c322930
2 changed files with 4 additions and 0 deletions

View File

@ -132,6 +132,7 @@ static const int Motion_Est_QTab[] = { ME_ZERO, ME_PHODS, ME_LOG,
allows the last part of a frame to be decoded earlier */ allows the last part of a frame to be decoded earlier */
#define CODEC_FLAG_NORMALIZE_AQP 0x00020000 /* normalize adaptive quantization */ #define CODEC_FLAG_NORMALIZE_AQP 0x00020000 /* normalize adaptive quantization */
#define CODEC_FLAG_INTERLACED_DCT 0x00040000 /* use interlaced dct */ #define CODEC_FLAG_INTERLACED_DCT 0x00040000 /* use interlaced dct */
#define CODEC_FLAG_LOW_DELAY 0x00080000 /* force low delay / will fail on b frames */
/* codec capabilities */ /* codec capabilities */

View File

@ -351,6 +351,9 @@ retry:
} }
ret = ff_mpeg4_decode_picture_header(s, &s->gb); ret = ff_mpeg4_decode_picture_header(s, &s->gb);
if(s->flags& CODEC_FLAG_LOW_DELAY)
s->low_delay=1;
s->has_b_frames= !s->low_delay; s->has_b_frames= !s->low_delay;
} else if (s->h263_intel) { } else if (s->h263_intel) {
ret = intel_h263_decode_picture_header(s); ret = intel_h263_decode_picture_header(s);