[vlc-devel] [PATCH] demux/mkv: do not hard-error on unknown elements when reading blocks

Filip Roséen filip at videolabs.io
Wed Jul 20 16:52:02 CEST 2016


If a certain type is not handled by the block reader, ignore it and
issue a warning instead of completely giving up.

--

This patch fixes the issue described here:

   - https://plus.google.com/104272816226409672249/posts/KMyt8KBXK2D

We currently do not have support for "Codec State", I've added this to
my todo-list and will probably create a trac-ticket for it during the
day.
---
 modules/demux/mkv/matroska_segment.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index f7209fc..84f52bd 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -1249,8 +1249,9 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, KaxSimpleBlock * & pp_s
         E_CASE_DEFAULT( element )
         {
             VLC_UNUSED(element);
-            msg_Err( vars.p_demuxer, "invalid level = %d", vars.obj->ep->GetLevel() );
-            throw VLC_EGENERIC;
+
+            msg_Warn( vars.p_demuxer, "unknown element at { fpos: %" PRId64 ", '%s' }",
+              element.GetElementPosition(), typeid( element ).name() );
         }
     };
 
-- 
2.9.0



More information about the vlc-devel mailing list