[vlc-commits] [Git][videolan/vlc][master] 2 commits: contrib: matroska: update to 1.7.1
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Apr 25 08:56:09 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
f017f75e by Steve Lhomme at 2026-04-25T08:01:21+00:00
contrib: matroska: update to 1.7.1
- - - - -
c1275396 by Steve Lhomme at 2026-04-25T08:01:21+00:00
contrib: matroska: fix block buffers leaking on End Of Stream error
We call ksblock.ReleaseFrames() if we didn't read data when we should have.
But it's too late, the list of buffers is gone.
This is the case since libmatroska 1.4.2 [^1].
Fixes #29541
[^1]: https://github.com/Matroska-Org/libmatroska/commit/4457e70466dcc77984202a05525428383cb74fe3
- - - - -
4 changed files:
- contrib/src/matroska/0001-KaxBlock-fix-leak-when-reading-EBML-lace-is-aborted.patch
- + contrib/src/matroska/0001-KaxBlock-release-read-buffers-on-EndOfStream-error.patch
- contrib/src/matroska/SHA512SUMS
- contrib/src/matroska/rules.mak
Changes:
=====================================
contrib/src/matroska/0001-KaxBlock-fix-leak-when-reading-EBML-lace-is-aborted.patch
=====================================
@@ -1,14 +1,14 @@
-From 9070393b99a801251ea55125c5236b5600a37eb9 Mon Sep 17 00:00:00 2001
+From 6d2ad6dfb9d16a7747cc8395b022fc20eb91d3ec Mon Sep 17 00:00:00 2001
From: Steve Lhomme <slhomme at matroska.org>
Date: Fri, 24 Oct 2025 11:18:54 +0200
-Subject: [PATCH] KaxBlock: fix leak when reading EBML lace is aborted
+Subject: [PATCH 1/2] KaxBlock: fix leak when reading EBML lace is aborted
---
src/KaxBlock.cpp | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/KaxBlock.cpp b/src/KaxBlock.cpp
-index fd37ad5..29073b5 100644
+index 62b0947..6a61b73 100644
--- a/src/KaxBlock.cpp
+++ b/src/KaxBlock.cpp
@@ -44,6 +44,8 @@
@@ -35,7 +35,7 @@ index fd37ad5..29073b5 100644
+ {
SizeRead = LastBufferSize;
- cursor = _tmpBuf = new binary[FrameNum*4]; /// \warning assume the mean size will be coded in less than 4 bytes
-+ auto _tmpBuf = std::make_unique<binary[]>(FrameNum*4); /// \warning assume the mean size will be coded in less than 4 bytes
++ auto _tmpBuf = std::make_unique<binary>(FrameNum*4); /// \warning assume the mean size will be coded in less than 4 bytes
+ cursor = _tmpBuf.get();
Result += input.read(cursor, FrameNum*4);
FrameSize = ReadCodedSizeValue(cursor, SizeRead, SizeUnknown);
@@ -55,5 +55,5 @@ index fd37ad5..29073b5 100644
for (Index=0; Index<=FrameNum; Index++) {
// get the size of the frame
--
-2.50.1 (Apple Git-155)
+2.52.0.windows.1
=====================================
contrib/src/matroska/0001-KaxBlock-release-read-buffers-on-EndOfStream-error.patch
=====================================
@@ -0,0 +1,24 @@
+From b0220cd5dde77970452a74dd9046b17617d3c7b8 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Wed, 22 Apr 2026 07:50:09 +0200
+Subject: [PATCH] KaxBlock: release read buffers on EndOfStream error
+
+---
+ src/KaxBlock.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/KaxBlock.cpp b/src/KaxBlock.cpp
+index 1fae7e4..1522799 100644
+--- a/src/KaxBlock.cpp
++++ b/src/KaxBlock.cpp
+@@ -708,6 +708,7 @@ filepos_t KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
+ } catch (SafeReadIOCallback::EndOfStreamX &) {
+ SetValueIsSet(false);
+
++ ReleaseFrames();
+ myBuffers.clear();
+ SizeList.clear();
+ Timecode = 0;
+--
+2.52.0.windows.1
+
=====================================
contrib/src/matroska/SHA512SUMS
=====================================
@@ -1 +1 @@
-e635958113ab57fb6c7e808d4ad51f87c38ec6ff348b202df1789b34d25ca22bc00fbdf1ec4f386bc803ef3da9f57057bae78ecf22deabdf1399755b1c6fdd3e libmatroska-1.7.0.tar.xz
+a6f38d388f6c9bfe399b9263ba4ef0965cfb4e27b39ac04453d5c9a9db8eac719a04c87b58d88b612902297e17aa7437382a66332f3f5b3d41744a13351751fd libmatroska-1.7.1.tar.xz
=====================================
contrib/src/matroska/rules.mak
=====================================
@@ -1,6 +1,6 @@
# matroska
-MATROSKA_VERSION := 1.7.0
+MATROSKA_VERSION := 1.7.1
MATROSKA_URL := https://dl.matroska.org/downloads/libmatroska/libmatroska-$(MATROSKA_VERSION).tar.xz
PKGS += matroska
@@ -19,6 +19,7 @@ $(TARBALLS)/libmatroska-$(MATROSKA_VERSION).tar.xz:
matroska: libmatroska-$(MATROSKA_VERSION).tar.xz .sum-matroska
$(UNPACK)
$(call pkg_static,"libmatroska.pc.in")
+ $(APPLY) $(SRC)/matroska/0001-KaxBlock-release-read-buffers-on-EndOfStream-error.patch
$(APPLY) $(SRC)/matroska/0001-KaxBlock-fix-leak-when-reading-EBML-lace-is-aborted.patch
$(MOVE)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e6ea837e4d317078900a9f0f3dda3d4e1cbeb056...c127539673823a8e6e09b0542f78a3ee7b17f20d
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e6ea837e4d317078900a9f0f3dda3d4e1cbeb056...c127539673823a8e6e09b0542f78a3ee7b17f20d
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list