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/libdiracdec.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/libdiracdec.c')
-rw-r--r-- | libavcodec/libdiracdec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/libdiracdec.c b/libavcodec/libdiracdec.c index 06830f76d9..6c6e46708c 100644 --- a/libavcodec/libdiracdec.c +++ b/libavcodec/libdiracdec.c @@ -88,10 +88,12 @@ static int libdirac_decode_frame(AVCodecContext *avccontext, *data_size = 0; - if (buf_size>0) + if (buf_size>0) { /* set data to decode into buffer */ dirac_buffer (p_dirac_params->p_decoder, buf, buf+buf_size); - + if ((buf[4] &0x08) == 0x08 && (buf[4] & 0x03)) + avccontext->has_b_frames = 1; + } while (1) { /* parse data and process result */ DecoderState state = dirac_parse (p_dirac_params->p_decoder); |