From cb4ccecc97cbca784285bb1e735e0197ffd1eac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 26 Nov 2016 12:16:18 +0200 Subject: [PATCH] h265parse: Fix assertion when encountering an invalid NALU Error out properly instead. https://bugzilla.gnome.org/show_bug.cgi?id=775130 --- gst/videoparsers/gsth265parse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c index 84be1195c7..f965a4b49c 100644 --- a/gst/videoparsers/gsth265parse.c +++ b/gst/videoparsers/gsth265parse.c @@ -883,8 +883,10 @@ gst_h265_parse_handle_frame (GstBaseParse * parse, *skipsize = size - 3; goto skip; default: - g_assert_not_reached (); - break; + /* should not really occur either */ + GST_ELEMENT_ERROR (h265parse, STREAM, FORMAT, + ("Error parsing H.265 stream"), ("Invalid H.265 stream")); + goto invalid_stream; } }