[FFmpeg-devel] [PATCH 2/5] avformat/matroskaenc: Don't reserve unnecessarily many EBML elements

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Mon Aug 7 02:06:24 EEST 2023


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>
---
 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;
-- 
2.34.1



More information about the ffmpeg-devel mailing list