Commit 91777673 authored by Jan Schmidt's avatar Jan Schmidt

splitmuxsink: Take ownership of floating refs

sink the floating ref when handed a muxer or sink to use so
we clearly take ownership.
parent a80265d6
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment