summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2017-04-05 20:17:48 +0200
committerMarton Balint <cus@passwd.hu>2017-04-12 20:21:11 +0200
commit1f9419753667beb6298d8d8b683211680abb4fe6 (patch)
tree962e1e982e2d2c66cf8d8259c33ff0f8b50c34fc
parentc92abd0c0e4db19530912ae170258798fdb14ddc (diff)
ffprobe: only use custom logging callback if -show_log is set
The custom callback can cause significant CPU usage on Windows for some large files with many index entries for some reason. v2: Move check after parsing options. Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r--ffprobe.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ffprobe.c b/ffprobe.c
index 0a9ba14d8d..72f5ed7182 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -3458,8 +3458,6 @@ int main(int argc, char **argv)
goto end;
}
#endif
- av_log_set_callback(log_callback);
-
av_log_set_flags(AV_LOG_SKIP_REPEATED);
register_exit(ffprobe_cleanup);
@@ -3475,6 +3473,9 @@ int main(int argc, char **argv)
show_banner(argc, argv, options);
parse_options(NULL, argc, argv, options, opt_input_file);
+ if (do_show_log)
+ av_log_set_callback(log_callback);
+
/* mark things to show, based on -show_entries */
SET_DO_SHOW(CHAPTERS, chapters);
SET_DO_SHOW(ERROR, error);