[FFmpeg-devel] [PATCH] if no errors were concealed, do not log

Andrew Ryan andrewr at nam-shub.com
Thu Jan 5 06:15:31 CET 2012


This leads to lots of extra log spew on the terminal when decoding WMV.
---
 libavcodec/error_resilience.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index 638215f..915640f 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -971,7 +971,9 @@ void ff_er_frame_end(MpegEncContext *s){
         if(error&ER_AC_ERROR) ac_error ++;
         if(error&ER_MV_ERROR) mv_error ++;
     }
-    av_log(s->avctx, AV_LOG_INFO, "concealing %d DC, %d AC, %d MV errors\n", dc_error, ac_error, mv_error);
+    if ((dc_error>0) || (ac_error>0) || (mv_error>0)) {
+      av_log(s->avctx, AV_LOG_INFO, "concealing %d DC, %d AC, %d MV errors\n", dc_error, ac_error, mv_error);
+    }
 
     is_intra_likely= is_intra_more_likely(s);
 
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list