diff options
author | Anuradha Suraparaju <anuradha@rd.bbc.co.uk> | 2008-12-22 00:01:39 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2008-12-22 00:01:39 +0000 |
commit | 64bfc5845bd4361d91f5bb7a7d76f416ee357ab6 (patch) | |
tree | 0a92947f69d310a3546c47efcc324c1ecfd6d13d /libavcodec/libschroedingerdec.c | |
parent | c4ff7c53e0135c3e0e65506f2ec95e1eeac6f069 (diff) | |
download | ffmpeg-64bfc5845bd4361d91f5bb7a7d76f416ee357ab6.tar.gz |
Fix incorrectly constructed Dirac parse units that caused A/V sync loss.
Fixes issue 694.
patch by Anuradha Suraparaju, anuradha rd.bbc.co uk
Originally committed as revision 16261 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/libschroedingerdec.c')
-rw-r--r-- | libavcodec/libschroedingerdec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/libschroedingerdec.c b/libavcodec/libschroedingerdec.c index f9b4d2198a..36cba01d36 100644 --- a/libavcodec/libschroedingerdec.c +++ b/libavcodec/libschroedingerdec.c @@ -235,6 +235,9 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext, do { if ((enc_buf = FfmpegFindNextSchroParseUnit(&parse_ctx))) { /* Push buffer into decoder. */ + if (SCHRO_PARSE_CODE_IS_PICTURE(enc_buf->data[4]) && + SCHRO_PARSE_CODE_NUM_REFS(enc_buf->data[4]) > 0) + avccontext->has_b_frames = 1; state = schro_decoder_push (decoder, enc_buf); if (state == SCHRO_DECODER_FIRST_ACCESS_UNIT) libschroedinger_handle_first_access_unit(avccontext); |