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
This commit is contained in:
Anuradha Suraparaju
2008-12-22 00:01:39 +00:00
committed by Diego Biurrun
parent c4ff7c53e0
commit 64bfc5845b
3 changed files with 192 additions and 20 deletions

View File

@@ -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);