[FFmpeg-devel] AVC: Test if not consumed bytes are all 0
Carl Eugen Hoyos
cehoyos
Sun Feb 15 14:06:58 CET 2009
Hi!
Attached patch silences ffmpeg for some camera recorded files.
Please comment, Carl Eugen
-------------- next part --------------
Index: libavcodec/h264.c
===================================================================
--- libavcodec/h264.c (revision 17319)
+++ libavcodec/h264.c (working copy)
@@ -7418,7 +7418,13 @@
}
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;
+ break;
+ }
+ av_log(h->s.avctx, debug_level, "AVC: Consumed only %d bytes instead of %d\n", consumed, nalsize);
consumed= nalsize;
}
More information about the ffmpeg-devel
mailing list