aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2009-02-15 15:23:02 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2009-02-15 15:23:02 +0000
commitc99a35768f754fa74177f19a87d5a3b7f3be8fab (patch)
tree5c38491e3b4f2f7f721edcf4337d62451ca5ff83 /libavcodec/h264.c
parentd1037c12056a038fb196c58efda5b5f037b53dab (diff)
downloadffmpeg-c99a35768f754fa74177f19a87d5a3b7f3be8fab.tar.gz
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
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 8853b845dc..285f9c9569 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;
}