comparison libschroedingerdec.c @ 8422:e623323d409f libavcodec

Fix incorrectly constructed Dirac parse units that caused A/V sync loss. Fixes issue 694. patch by Anuradha Suraparaju, anuradha rd.bbc.co uk
author diego
date Mon, 22 Dec 2008 00:01:39 +0000
parents dea986389c57
children e9d9d946f213
comparison
equal deleted inserted replaced
8421:9ea0742666b9 8422:e623323d409f
233 233
234 /* Loop through all the individual parse units in the input buffer */ 234 /* Loop through all the individual parse units in the input buffer */
235 do { 235 do {
236 if ((enc_buf = FfmpegFindNextSchroParseUnit(&parse_ctx))) { 236 if ((enc_buf = FfmpegFindNextSchroParseUnit(&parse_ctx))) {
237 /* Push buffer into decoder. */ 237 /* Push buffer into decoder. */
238 if (SCHRO_PARSE_CODE_IS_PICTURE(enc_buf->data[4]) &&
239 SCHRO_PARSE_CODE_NUM_REFS(enc_buf->data[4]) > 0)
240 avccontext->has_b_frames = 1;
238 state = schro_decoder_push (decoder, enc_buf); 241 state = schro_decoder_push (decoder, enc_buf);
239 if (state == SCHRO_DECODER_FIRST_ACCESS_UNIT) 242 if (state == SCHRO_DECODER_FIRST_ACCESS_UNIT)
240 libschroedinger_handle_first_access_unit(avccontext); 243 libschroedinger_handle_first_access_unit(avccontext);
241 go = 1; 244 go = 1;
242 } 245 }