aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-03-28 09:42:30 +0200
committerAnton Khirnov <anton@khirnov.net>2023-04-13 15:11:56 +0200
commitd99846d2f22b210ce91535a44822b93d522df829 (patch)
treee0fdcd0fb21608a8ed4d6a1cbfb84eda67bb83a6
parentf2c8dff9067ce04bf9db44dcae95f1649a623217 (diff)
downloadffmpeg-d99846d2f22b210ce91535a44822b93d522df829.tar.gz
fftools/ffmpeg: move the hw_device_free_all() call to ffmpeg_cleanup()
Frees devices on failure as well as success.
-rw-r--r--fftools/ffmpeg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 1cd9a8f29f..816b6c4b08 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -551,6 +551,8 @@ static void ffmpeg_cleanup(int ret)
av_freep(&vstats_filename);
of_enc_stats_close();
+ hw_device_free_all();
+
av_freep(&filter_nbthreads);
av_freep(&input_files);
@@ -2973,8 +2975,6 @@ static int transcode(void)
exit_program(1);
}
- hw_device_free_all();
-
return 0;
}