dashdemux: unref pad reference when removing internal source in error

Avoids leaking the pad in error situations
This commit is contained in:
Thiago Santos 2014-08-19 17:17:33 -03:00
parent 4afa05e567
commit 1cabb3b5a5

View file

@ -2077,9 +2077,11 @@ gst_dash_demux_stream_update_source (GstDashDemuxStream * stream,
GST_DEBUG_OBJECT (demux, "Failed to re-use old source element: %s",
err->message);
g_clear_error (&err);
gst_object_unref (stream->src_srcpad);
gst_element_set_state (stream->src, GST_STATE_NULL);
gst_bin_remove (GST_BIN_CAST (demux), stream->src);
stream->src = NULL;
stream->src_srcpad = NULL;
}
}
g_free (old_uri);