# HG changeset patch # User michael # Date 1205372959 0 # Node ID bb799e3bc64be386eb9ae3be41e031f0fe9fcdf5 # Parent 4d1efaedfae675fe56ecd31915c16729d86c479a If consumed does not match nalsize, favor nalsize. Fixes issue385. diff -r 4d1efaedfae6 -r bb799e3bc64b h264.c --- a/h264.c Thu Mar 13 00:20:15 2008 +0000 +++ b/h264.c Thu Mar 13 01:49:19 2008 +0000 @@ -7495,8 +7495,10 @@ 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;