[FFmpeg-cvslog] avformat/matroskaenc: Don't reserve unnecessarily many EBML elements

Andreas Rheinhardt git at videolan.org
Thu Aug 10 09:47:22 EEST 2023


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Aug  6 21:47:52 2023 +0200| [fd8a395cd75f82f31cef408e6da9ece3acfec95c] | committer: Andreas Rheinhardt

avformat/matroskaenc: Don't reserve unnecessarily many EBML elements

bda44f0f39e8ee646e54f15989d7845f4bf58d26 added code that
potentially added another BlockMore master and BlockAdditional
data as well as BlockAddID number, yet it bumped the number
of EBML elements by four instead of only three.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavformat/matroskaenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index c1f40b26e6..7eb734f1a9 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -2709,8 +2709,8 @@ static int mkv_write_block(void *logctx, MatroskaMuxContext *mkv,
     size_t side_data_size;
     uint64_t additional_id;
     unsigned track_number = track->track_num;
+    EBML_WRITER(12);
     int ret;
-    EBML_WRITER(13);
 
     mkv->cur_block.track  = track;
     mkv->cur_block.pkt    = pkt;



More information about the ffmpeg-cvslog mailing list