From: Carl Eugen Hoyos Date: Sun, 15 Feb 2009 15:23:02 +0000 (+0000) Subject: Silence following warning if only zeros were not consumed: X-Git-Tag: v0.5~422 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c99a35768f754fa74177f19a87d5a3b7f3be8fab;p=platform%2Fupstream%2Flibav.git Silence following warning if only zeros were not consumed: AVC: Consumed only m bytes instead of n Originally committed as revision 17327 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 8853b84..285f9c9 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -7418,7 +7418,11 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ } 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); + int i, debug_level = AV_LOG_DEBUG; + for (i = consumed; i < nalsize; i++) + if (buf[buf_index+i]) + debug_level = AV_LOG_ERROR; + av_log(h->s.avctx, debug_level, "AVC: Consumed only %d bytes instead of %d\n", consumed, nalsize); consumed= nalsize; }