mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
splitmuxsink: Take ownership of floating refs
sink the floating ref when handed a muxer or sink to use so we clearly take ownership.
This commit is contained in:
parent
a80265d65a
commit
917776730d
1 changed files with 6 additions and 2 deletions
|
@ -359,14 +359,16 @@ gst_splitmux_sink_set_property (GObject * object, guint prop_id,
|
|||
GST_OBJECT_LOCK (splitmux);
|
||||
if (splitmux->provided_sink)
|
||||
gst_object_unref (splitmux->provided_sink);
|
||||
splitmux->provided_sink = g_value_dup_object (value);
|
||||
splitmux->provided_sink = g_value_get_object (value);
|
||||
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);
|
||||
splitmux->provided_muxer = g_value_dup_object (value);
|
||||
splitmux->provided_muxer = g_value_get_object (value);
|
||||
gst_object_ref_sink (splitmux->provided_muxer);
|
||||
GST_OBJECT_UNLOCK (splitmux);
|
||||
break;
|
||||
default:
|
||||
|
@ -1492,6 +1494,8 @@ gst_splitmux_sink_release_pad (GstElement * element, GstPad * pad)
|
|||
|
||||
/* Can release the context now */
|
||||
mq_stream_ctx_unref (ctx);
|
||||
if (ctx == splitmux->reference_ctx)
|
||||
splitmux->reference_ctx = NULL;
|
||||
|
||||
/* Release and free the mq input */
|
||||
gst_element_release_request_pad (splitmux->mq, mqsink);
|
||||
|
|
Loading…
Reference in a new issue