comparison h264.c @ 6490:bb799e3bc64b libavcodec

If consumed does not match nalsize, favor nalsize. Fixes issue385.
author michael
date Thu, 13 Mar 2008 01:49:19 +0000
parents ecbe9565dcae
children 48759bfbd073
comparison
equal deleted inserted replaced
6489:4d1efaedfae6 6490:bb799e3bc64b
7493 7493
7494 if(s->avctx->debug&FF_DEBUG_STARTCODE){ 7494 if(s->avctx->debug&FF_DEBUG_STARTCODE){
7495 av_log(h->s.avctx, AV_LOG_DEBUG, "NAL %d at %d/%d length %d\n", hx->nal_unit_type, buf_index, buf_size, dst_length); 7495 av_log(h->s.avctx, AV_LOG_DEBUG, "NAL %d at %d/%d length %d\n", hx->nal_unit_type, buf_index, buf_size, dst_length);
7496 } 7496 }
7497 7497
7498 if (h->is_avc && (nalsize != consumed)) 7498 if (h->is_avc && (nalsize != consumed)){
7499 av_log(h->s.avctx, AV_LOG_ERROR, "AVC: Consumed only %d bytes instead of %d\n", consumed, nalsize); 7499 av_log(h->s.avctx, AV_LOG_ERROR, "AVC: Consumed only %d bytes instead of %d\n", consumed, nalsize);
7500 consumed= nalsize;
7501 }
7500 7502
7501 buf_index += consumed; 7503 buf_index += consumed;
7502 7504
7503 if( (s->hurry_up == 1 && h->nal_ref_idc == 0) //FIXME do not discard SEI id 7505 if( (s->hurry_up == 1 && h->nal_ref_idc == 0) //FIXME do not discard SEI id
7504 ||(avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0)) 7506 ||(avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0))