diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-03-13 01:49:19 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-03-13 01:49:19 +0000 |
commit | 9d2cc8c1ee586c4f01745ed78ece1462119c68fb (patch) | |
tree | 821c72a01bc9c15b5cf48da1cb638df4d257bb1e /libavcodec/h264.c | |
parent | 6ef291287951d893fd6e2f09ba83501826cb6c40 (diff) | |
download | ffmpeg-9d2cc8c1ee586c4f01745ed78ece1462119c68fb.tar.gz |
If consumed does not match nalsize, favor nalsize.
Fixes issue385.
Originally committed as revision 12430 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 014a292359..e945774078 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -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; |