Mercurial > libavcodec.hg
diff h264.c @ 8920:a79f5a6fd15a libavcodec
Silence following warning if only zeros were not consumed:
AVC: Consumed only m bytes instead of n
author | cehoyos |
---|---|
date | Sun, 15 Feb 2009 15:23:02 +0000 |
parents | 530309ea02d8 |
children | e03f0d4f9e3d |
line wrap: on
line diff
--- a/h264.c Sun Feb 15 12:31:01 2009 +0000 +++ b/h264.c Sun Feb 15 15:23:02 2009 +0000 @@ -7418,7 +7418,11 @@ } 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; }