[FFmpeg-cvslog] fftools/ffmpeg_mux: rename of_close() to of_free()

Anton Khirnov git at videolan.org
Wed Aug 30 13:00:29 EEST 2023


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Jul  8 10:22:13 2023 +0200| [bff48e8d693d4cf8fc3828937fbd9be8c1881b1d] | committer: Anton Khirnov

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).

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bff48e8d693d4cf8fc3828937fbd9be8c1881b1d
---

 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;



More information about the ffmpeg-cvslog mailing list