]> granicus.if.org Git - libmatroska/commitdiff
KaxBlockGroup, KaxSimpleBlock: fix writing track number == 128
authorMoritz Bunkus <moritz@bunkus.org>
Mon, 25 Sep 2017 17:55:26 +0000 (19:55 +0200)
committerMoritz Bunkus <moritz@bunkus.org>
Mon, 25 Sep 2017 18:19:45 +0000 (20:19 +0200)
ChangeLog
src/KaxBlock.cpp

index 9e719bdf8bb183b96b05b0f919819311cd693bb2..c37383f57f2506c160a806e2a6795467faa87e75 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-09-25  Moritz Bunkus  <moritz@bunkus.org>
+
+        * KaxBlockGroup, KaxSimpleBlock: fixed writing the block header
+        if the track number is 128.
+
 2017-03-10  Moritz Bunkus  <moritz@bunkus.org>
 
         * Released v1.4.7 with the single change of setting the version
index 22d213283603fe51ef85030c6f376468cdaa0537..3fa18e51c999e76f0801164fcfa8b5a4c67dca60 100644 (file)
@@ -287,7 +287,7 @@ filepos_t KaxInternalBlock::RenderData(IOCallback & output, bool /* bForceRender
         mLacing = LACING_EBML; // supposedly the best of all
       SetSize_(4 + 1); // 1 for the lacing head (number of laced elements)
     }
-    if (TrackNumber > 0x80)
+    if (TrackNumber >= 0x80)
       SetSize_(GetSize() + 1);
 
     // write Block Head
@@ -338,7 +338,7 @@ filepos_t KaxInternalBlock::RenderData(IOCallback & output, bool /* bForceRender
         assert(0);
     }
 
-    output.writeFully(BlockHead, 4 + ((TrackNumber > 0x80) ? 1 : 0));
+    output.writeFully(BlockHead, 4 + ((TrackNumber >= 0x80) ? 1 : 0));
 
     binary tmpValue;
     switch (mLacing) {