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

Marton Balint cus at passwd.hu
Wed Apr 5 21:20:20 EEST 2017


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

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



More information about the ffmpeg-devel mailing list