If consumed does not match nalsize, favor nalsize.

Fixes issue385.

Originally committed as revision 12430 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-03-13 01:49:19 +00:00
parent 6ef2912879
commit 9d2cc8c1ee
1 changed files with 3 additions and 1 deletions

View File

@ -7495,8 +7495,10 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
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);
}
if (h->is_avc && (nalsize != consumed))
if (h->is_avc && (nalsize != consumed)){
av_log(h->s.avctx, AV_LOG_ERROR, "AVC: Consumed only %d bytes instead of %d\n", consumed, nalsize);
consumed= nalsize;
}
buf_index += consumed;