From: Seungha Yang Date: Mon, 6 Jan 2020 16:20:24 +0000 (+0900) Subject: splitmuxsink: Fix assertion failure on set_property() X-Git-Tag: 1.19.3~509^2~778 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8445685a21b7c912595827646ef2900ebc84a100;p=platform%2Fupstream%2Fgstreamer.git splitmuxsink: Fix assertion failure on set_property() GValue might have null object. (gst-inspect-1.0:10304): GStreamer-CRITICAL ... gst_object_ref_sink: assertion 'object != NULL' failed --- diff --git a/gst/multifile/gstsplitmuxsink.c b/gst/multifile/gstsplitmuxsink.c index 373b671d7d..7944612948 100644 --- a/gst/multifile/gstsplitmuxsink.c +++ b/gst/multifile/gstsplitmuxsink.c @@ -731,18 +731,18 @@ gst_splitmux_sink_set_property (GObject * object, guint prop_id, break; case PROP_SINK: GST_OBJECT_LOCK (splitmux); - if (splitmux->provided_sink) - gst_object_unref (splitmux->provided_sink); + gst_clear_object (&splitmux->provided_sink); splitmux->provided_sink = g_value_get_object (value); - gst_object_ref_sink (splitmux->provided_sink); + if (splitmux->provided_sink) + gst_object_ref_sink (splitmux->provided_sink); GST_OBJECT_UNLOCK (splitmux); break; case PROP_MUXER: GST_OBJECT_LOCK (splitmux); - if (splitmux->provided_muxer) - gst_object_unref (splitmux->provided_muxer); + gst_clear_object (&splitmux->provided_muxer); splitmux->provided_muxer = g_value_get_object (value); - gst_object_ref_sink (splitmux->provided_muxer); + if (splitmux->provided_muxer) + gst_object_ref_sink (splitmux->provided_muxer); GST_OBJECT_UNLOCK (splitmux); break; case PROP_RESET_MUXER: