From 6e412d42c78611eb66f4f908d03829861bbf7601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 27 Jul 2020 16:37:20 +0300 Subject: [PATCH] hlssink2: Don't assert if we don't have a current location when receiving the fragment-closed message This can happen if the application did not provide an output stream for the fragment and didn't handle the error message before splitmuxsink decided to consider the fragment closed. Part-of: --- ext/hls/gsthlssink2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/hls/gsthlssink2.c b/ext/hls/gsthlssink2.c index 1394552483..4751fc579a 100644 --- a/ext/hls/gsthlssink2.c +++ b/ext/hls/gsthlssink2.c @@ -419,7 +419,11 @@ gst_hls_sink2_handle_message (GstBin * bin, GstMessage * message) GstClockTime running_time; gchar *entry_location; - g_assert (sink->current_location != NULL); + if (!sink->current_location) { + GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE, ((NULL)), + ("Fragment closed without knowing its location")); + break; + } gst_structure_get_clock_time (s, "running-time", &running_time);