From c659c92091e5ae10baaf3e66f5caf7ddc6d34f0d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philip=20J=C3=A4genstedt?= Date: Thu, 13 May 2010 10:23:10 +0200 Subject: [PATCH] ebml: crude hack to avoid crashing on unexpected metadata The comment says this cannot happen, but it did and I don't know why. This is not the correct fix, needs investigation. Test case: bug_s555010094_r0.0005:0.008____IA__g_assertion_message_expr.webm --- gst/matroska/matroska-demux.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 0e1bbf7..0dfd941 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -3349,8 +3349,10 @@ gst_matroska_demux_parse_metadata (GstMatroskaDemux * demux) GList *l; GstEbmlLevel *curlevel; - /* Can't be NULL at this point */ - g_assert (ebml->level != NULL); + if (ebml->level == NULL) { + GST_ERROR_OBJECT (demux, "Unexpected metadata, bailing"); + return GST_FLOW_ERROR; + } curlevel = ebml->level->data; /* Make sure we don't parse a tags element twice and -- 2.7.4