diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-10-17 11:37:45 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-10-25 11:04:42 +0200 |
commit | 295848bacb120da0fbe74b7f98888c328ac8dd44 (patch) | |
tree | ed7bf1f8e7b788cd9cb6525c9f561d28ec9dfb98 /fftools/ffmpeg.c | |
parent | 09cd147dccc149ae17081d6016ccb79f1afcb592 (diff) |
fftools/ffmpeg: move closing the input file into a separate function
For now this is just closing the format context and freeing InputFile,
but will contain more in the future.
Diffstat (limited to 'fftools/ffmpeg.c')
-rw-r--r-- | fftools/ffmpeg.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index f8b02a8871..842ed2fa66 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -556,10 +556,9 @@ static void ffmpeg_cleanup(int ret) of_close(&output_files[i]); free_input_threads(); - for (i = 0; i < nb_input_files; i++) { - avformat_close_input(&input_files[i]->ctx); - av_freep(&input_files[i]); - } + for (i = 0; i < nb_input_files; i++) + ifile_close(&input_files[i]); + for (i = 0; i < nb_input_streams; i++) { InputStream *ist = input_streams[i]; |