From 9dc1a32d5aa42f39a2a82c97d3ea6bad33dbe501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Thu, 7 Nov 2019 12:28:58 +0100 Subject: [PATCH] splitmuxsink: add fakesink support fakesink does not support "location" property and was generating a warning. --- gst/multifile/gstsplitmuxsink.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gst/multifile/gstsplitmuxsink.c b/gst/multifile/gstsplitmuxsink.c index def34f7d0e..d6fd1e8422 100644 --- a/gst/multifile/gstsplitmuxsink.c +++ b/gst/multifile/gstsplitmuxsink.c @@ -973,7 +973,10 @@ send_fragment_opened_closed_msg (GstSplitMuxSink * splitmux, gboolean opened, running_time = *rtime; } - g_object_get (sink, "location", &location, NULL); + if (g_object_class_find_property (G_OBJECT_GET_CLASS (splitmux->sink), + "location") != NULL) + g_object_get (sink, "location", &location, NULL); + /* If it's in the middle of a teardown, the reference_ctc might have become * NULL */ @@ -3149,7 +3152,9 @@ set_next_filename (GstSplitMuxSink * splitmux, MqStreamCtx * ctx) if (fname) { GST_INFO_OBJECT (splitmux, "Setting file to %s", fname); - g_object_set (splitmux->sink, "location", fname, NULL); + if (g_object_class_find_property (G_OBJECT_GET_CLASS (splitmux->sink), + "location") != NULL) + g_object_set (splitmux->sink, "location", fname, NULL); g_free (fname); splitmux->fragment_id++;