[FFmpeg-devel] [PATCH] ffprobe: only use custom logging callback if -show_log is set

Marton Balint cus at passwd.hu
Sun Apr 9 22:24:56 EEST 2017


On Wed, 5 Apr 2017, Marton Balint wrote:

> The custom callback can cause significant CPU usage on Windows for some large
> files with many index entries for some reason.
>

Will push this soon to master and 3.3.

Regards,
Marton

> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
> ffprobe.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/ffprobe.c b/ffprobe.c
> index 0a9ba14..3d321cb 100644
> --- a/ffprobe.c
> +++ b/ffprobe.c
> @@ -3458,7 +3458,8 @@ int main(int argc, char **argv)
>         goto end;
>     }
> #endif
> -    av_log_set_callback(log_callback);
> +    if (do_show_log)
> +        av_log_set_callback(log_callback);
>
>     av_log_set_flags(AV_LOG_SKIP_REPEATED);
>     register_exit(ffprobe_cleanup);
> -- 
> 2.10.2
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list