summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2020-07-27 16:37:20 +0300
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-08-03 11:23:36 +0000
commit6e412d42c78611eb66f4f908d03829861bbf7601 (patch)
tree5d4697593c4e7c38c1c4aa0a3792beec0e45a0c4
parent8544f3928ea46d2da3f27dc65576e8baf42a46d0 (diff)
downloadgstreamer-plugins-bad-6e412d42c78611eb66f4f908d03829861bbf7601.tar.gz
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1469>
-rw-r--r--ext/hls/gsthlssink2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/hls/gsthlssink2.c b/ext/hls/gsthlssink2.c
index 139455248..4751fc579 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);