From 434f00749069c1e186ba91039fc95d273a3e5da4 Mon Sep 17 00:00:00 2001 From: xufuji456 <839789740@qq.com> Date: Tue, 16 Nov 2021 00:58:28 +0800 Subject: [PATCH] clean up after probing --- app/src/main/cpp/ffmpeg/ffprobe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/ffmpeg/ffprobe.c b/app/src/main/cpp/ffmpeg/ffprobe.c index ef71148..83947c0 100644 --- a/app/src/main/cpp/ffmpeg/ffprobe.c +++ b/app/src/main/cpp/ffmpeg/ffprobe.c @@ -426,6 +426,7 @@ static void ffprobe_cleanup(int ret) av_dict_free(&(sections[i].entries_to_show)); buffer_length = 0; + input_filename = NULL; #if HAVE_THREADS pthread_mutex_destroy(&log_mutex); #endif @@ -3663,7 +3664,6 @@ char* ffprobe_run(int argc, char **argv) } #endif av_log_set_flags(AV_LOG_SKIP_REPEATED); - register_exit(ffprobe_cleanup); options = real_options; parse_loglevel(argc, argv, options); @@ -3791,6 +3791,7 @@ end: av_dict_free(&(sections[i].entries_to_show)); avformat_network_deinit(); + ffprobe_cleanup(ret); return print_buffer; }