Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits: 6032a6a8 by Steve Lhomme at 2026-05-15T13:08:37+00:00 contrib: matroska: expand FrameNum after reading Fixes #29834 - - - - - 2 changed files: - + contrib/src/matroska/0001-KaxBlock-expand-FrameNum-after-reading.patch - contrib/src/matroska/rules.mak Changes: ===================================== contrib/src/matroska/0001-KaxBlock-expand-FrameNum-after-reading.patch ===================================== @@ -0,0 +1,41 @@ +From fd4cfd9f04fa6fba4f1ac9ecc9b68930e40056ec Mon Sep 17 00:00:00 2001 +From: Steve Lhomme <[email protected]> +Date: Tue, 12 May 2026 07:59:51 +0200 +Subject: [PATCH] KaxBlock: expand FrameNum after reading + +It's read as a uint8_t. Adding 1 to 255 would end up being 0. +--- + src/KaxBlock.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/KaxBlock.cpp b/src/KaxBlock.cpp +index 7bcc879..b3f2a84 100644 +--- a/src/KaxBlock.cpp ++++ b/src/KaxBlock.cpp +@@ -496,9 +496,9 @@ filepos_t KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully) + } else { + // read the number of frames in the lace + uint32 LastBufferSize = GetSize() - BlockHeadSize - 1; // 1 for number of frame +- const uint8 FrameNum = Mem.GetUInt8(); // number of frames in the lace - 1 ++ const unsigned FrameNum = Mem.GetUInt8(); // number of frames in the lace - 1 + // read the list of frame sizes +- uint8 Index; ++ unsigned Index; + int32 FrameSize; + uint32 SizeRead; + uint64 SizeUnknown; +@@ -628,9 +628,9 @@ filepos_t KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully) + // read the number of frames in the lace + const uint32 TotalLacedSize = GetSize() - BlockHeadSize - 1; // 1 for number of frame + uint32 LastBufferSize = TotalLacedSize; +- const uint8 FrameNum = _TempHead[0]; // number of frames in the lace - 1 ++ const unsigned FrameNum = _TempHead[0]; // number of frames in the lace - 1 + // read the list of frame sizes +- uint8 Index; ++ unsigned Index; + uint32 FrameSize; + uint32 SizeRead; + uint64 SizeUnknown; +-- +2.52.0.windows.1 + ===================================== contrib/src/matroska/rules.mak ===================================== @@ -24,6 +24,7 @@ matroska: libmatroska-$(MATROSKA_VERSION).tar.xz .sum-matroska $(APPLY) $(SRC)/matroska/0001-KaxBlock-rework-EBML-lacing-sizes-in-SCOPE_PARTIAL_D.patch $(APPLY) $(SRC)/matroska/0002-KaxBlock-throw-when-the-EBML-length-difference-gives.patch $(APPLY) $(SRC)/matroska/0003-KaxBlock-fix-reading-EBML-lacing-with-just-one-frame.patch + $(APPLY) $(SRC)/matroska/0001-KaxBlock-expand-FrameNum-after-reading.patch $(MOVE) .matroska: matroska toolchain.cmake View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6032a6a89ad4a11fe0b1d7745d5f948e41380d86 -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6032a6a89ad4a11fe0b1d7745d5f948e41380d86 You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
_______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
