mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
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>
This commit is contained in:
parent
c92abd0c0e
commit
1f94197536
@ -3458,8 +3458,6 @@ int main(int argc, char **argv)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
av_log_set_callback(log_callback);
|
|
||||||
|
|
||||||
av_log_set_flags(AV_LOG_SKIP_REPEATED);
|
av_log_set_flags(AV_LOG_SKIP_REPEATED);
|
||||||
register_exit(ffprobe_cleanup);
|
register_exit(ffprobe_cleanup);
|
||||||
|
|
||||||
@ -3475,6 +3473,9 @@ int main(int argc, char **argv)
|
|||||||
show_banner(argc, argv, options);
|
show_banner(argc, argv, options);
|
||||||
parse_options(NULL, argc, argv, options, opt_input_file);
|
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 */
|
/* mark things to show, based on -show_entries */
|
||||||
SET_DO_SHOW(CHAPTERS, chapters);
|
SET_DO_SHOW(CHAPTERS, chapters);
|
||||||
SET_DO_SHOW(ERROR, error);
|
SET_DO_SHOW(ERROR, error);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user