From bff48e8d693d4cf8fc3828937fbd9be8c1881b1d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 8 Jul 2023 10:22:13 +0200 Subject: [PATCH] fftools/ffmpeg_mux: rename of_close() to of_free() This function is primarily a destructor for OutputFile, the underlying AVIOContext is normally closed earlier (right after writing the trailer). --- fftools/ffmpeg.c | 3 +-- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_mux.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 8b0f31aac6..45844b489f 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -362,9 +362,8 @@ static void ffmpeg_cleanup(int ret) fg_free(&filtergraphs[i]); av_freep(&filtergraphs); - /* close files */ for (i = 0; i < nb_output_files; i++) - of_close(&output_files[i]); + of_free(&output_files[i]); for (i = 0; i < nb_input_files; i++) ifile_close(&input_files[i]); diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index ef5bb13908..9c85df5bdf 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -821,7 +821,7 @@ int enc_flush(void); int of_stream_init(OutputFile *of, OutputStream *ost); int of_write_trailer(OutputFile *of); int of_open(const OptionsContext *o, const char *filename); -void of_close(OutputFile **pof); +void of_free(OutputFile **pof); void of_enc_stats_close(void); diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 54410aac5c..e74b5f09f5 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -917,7 +917,7 @@ static void fc_close(AVFormatContext **pfc) *pfc = NULL; } -void of_close(OutputFile **pof) +void of_free(OutputFile **pof) { OutputFile *of = *pof; Muxer *mux;