diff options
author | Marton Balint <cus@passwd.hu> | 2017-04-05 20:17:48 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2017-04-12 21:09:32 +0200 |
commit | 69e35db80d0f066aff401390afbf114a027d7817 (patch) | |
tree | 51abad26feac38cb531df36ad51b0d29093f24b5 | |
parent | af43c7092cf2da189c912220f19b132d62a9699f (diff) | |
download | ffmpeg-69e35db80d0f066aff401390afbf114a027d7817.tar.gz |
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -3442,8 +3442,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); @@ -3459,6 +3457,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); |