changeset 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 2dc78db4de26
children 233fda721f1b
files h264.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
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;
         }