[vlc-devel] [PATCH 7/7] demux:mkv: delete the Dummy we don't want after we have skipped it in the reader

Steve Lhomme robux4 at videolabs.io
Mon Nov 13 18:08:46 CET 2017


Should fix #18001 again
---
 modules/demux/mkv/Ebml_parser.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/demux/mkv/Ebml_parser.cpp b/modules/demux/mkv/Ebml_parser.cpp
index 5f663c6a45..eb76e780eb 100644
--- a/modules/demux/mkv/Ebml_parser.cpp
+++ b/modules/demux/mkv/Ebml_parser.cpp
@@ -274,10 +274,10 @@ EbmlElement *EbmlParser::Get( int n_call )
                 return NULL;
             }
 
-            delete m_el[mi_level];
-            m_el[mi_level] = NULL;
-            m_el[mi_level - 1]->SkipData( *m_es, EBML_CONTEXT(m_el[mi_level - 1]) );
-            return Get();
+            EbmlElement *unwanted_dummy = m_el[mi_level];
+            EbmlElement *upper_dummy = Get();
+            delete unwanted_dummy;
+            return upper_dummy;
         }
     }
 
-- 
2.14.2



More information about the vlc-devel mailing list