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

Filip Roséen git at videolan.org
Thu Jul 21 14:37:11 CEST 2016


vlc | branch: master | Filip Roséen <filip at videolabs.io> | Wed Jul 20 16:52:02 2016 +0200| [02a41b69d7adcadd27fb899428f9ce5a36a3cdf6] | committer: Jean-Baptiste Kempf

demux/mkv: do not hard-error on unknown elements when reading blocks

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

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=02a41b69d7adcadd27fb899428f9ce5a36a3cdf6
---

 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() );
         }
     };
 



More information about the vlc-commits mailing list