diff mbox series

[FFmpeg-devel,16/20] avformat/matroskaenc: Remove unused function parameter

Message ID 20200101005837.11356-17-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series Matroska muxer patches
Related show


Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Andreas Rheinhardt Jan. 1, 2020, 12:58 a.m. UTC
end_ebml_master_crc32_preliminary() has a MatroskaMuxContext as
parameter that isn't used at all. So remove it.
Furthermore it doesn't close its dynamic buffer; it just uses the
underlying buffer and therefore it only needs a pointer to the
dynamic buffer, not a pointer to a pointer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
 libavformat/matroskaenc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series


diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index f9509129c8..c0979feb88 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -361,11 +361,11 @@  static void end_ebml_master_crc32(AVIOContext *pb, AVIOContext **dyn_cp,
 * Complete ebml master without destroying the buffer, allowing for later updates
-static void end_ebml_master_crc32_preliminary(AVIOContext *pb, AVIOContext **dyn_cp, MatroskaMuxContext *mkv,
+static void end_ebml_master_crc32_preliminary(AVIOContext *pb, AVIOContext *dyn_cp,
                                               uint32_t id, int64_t *pos)
     uint8_t *buf;
-    int size = avio_get_dyn_buf(*dyn_cp, &buf);
+    int size = avio_get_dyn_buf(dyn_cp, &buf);
     *pos = avio_tell(pb);
@@ -1389,7 +1389,7 @@  static int mkv_write_tracks(AVFormatContext *s)
     if ((pb->seekable & AVIO_SEEKABLE_NORMAL) && !mkv->is_live)
-        end_ebml_master_crc32_preliminary(pb, &mkv->tracks_bc, mkv,
+        end_ebml_master_crc32_preliminary(pb, mkv->tracks_bc,
                                           MATROSKA_ID_TRACKS, &mkv->tracks_pos);
         end_ebml_master_crc32(pb, &mkv->tracks_bc, mkv, MATROSKA_ID_TRACKS);
@@ -1644,7 +1644,7 @@  static int mkv_write_tags(AVFormatContext *s)
     if (mkv->tags_bc) {
         if ((s->pb->seekable & AVIO_SEEKABLE_NORMAL) && !mkv->is_live)
-            end_ebml_master_crc32_preliminary(s->pb, &mkv->tags_bc, mkv,
+            end_ebml_master_crc32_preliminary(s->pb, mkv->tags_bc,
                                               MATROSKA_ID_TAGS, &mkv->tags_pos);
             end_ebml_master_crc32(s->pb, &mkv->tags_bc, mkv, MATROSKA_ID_TAGS);
@@ -1881,7 +1881,7 @@  static int mkv_write_header(AVFormatContext *s)
     if ((s->pb->seekable & AVIO_SEEKABLE_NORMAL) && !mkv->is_live)
-        end_ebml_master_crc32_preliminary(s->pb, &mkv->info_bc, mkv,
+        end_ebml_master_crc32_preliminary(s->pb, mkv->info_bc,
                                           MATROSKA_ID_INFO, &mkv->info_pos);
         end_ebml_master_crc32(s->pb, &mkv->info_bc, mkv, MATROSKA_ID_INFO);