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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Jan 5 09:37:35 CET 2012


On 5 Jan 2012, at 06:15, Andrew Ryan <andrewr at nam-shub.com> wrote:
> 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);
> +    }

I don't think we should be silent when error concealment is run, that means something went wrong.


More information about the ffmpeg-devel mailing list