mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-16 04:54:12 +00:00
gst/gstpipeline.c (gst_pipeline_init): Drop ref on bus after gst_element_set_bus.
Original commit message from CVS: 2005-05-14 Andy Wingo <wingo@pobox.com> * gst/gstpipeline.c (gst_pipeline_init): Drop ref on bus after gst_element_set_bus. (gst_pipeline_dispose): Set the bus on the pipeline to NULL. In normal cases, this will destroy the bus. * gst/gstutils.c (prepare_link_maybe_ghosting): Drop ref on root object.
This commit is contained in:
parent
c967174c17
commit
4765634c62
3 changed files with 13 additions and 0 deletions
|
@ -1,5 +1,13 @@
|
|||
2005-05-14 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
* gst/gstpipeline.c (gst_pipeline_init): Drop ref on bus after
|
||||
gst_element_set_bus.
|
||||
(gst_pipeline_dispose): Set the bus on the pipeline to NULL. In
|
||||
normal cases, this will destroy the bus.
|
||||
|
||||
* gst/gstutils.c (prepare_link_maybe_ghosting): Drop ref on root
|
||||
object.
|
||||
|
||||
* gst/gstbin.c (gst_bin_change_state): Fix state changes if a bin
|
||||
has no sinks.
|
||||
|
||||
|
|
|
@ -163,6 +163,8 @@ gst_pipeline_init (GTypeInstance * instance, gpointer g_class)
|
|||
/* we are our own manager */
|
||||
GST_ELEMENT_MANAGER (pipeline) = pipeline;
|
||||
gst_element_set_bus (GST_ELEMENT (pipeline), bus);
|
||||
/* set_bus refs the bus via gst_object_replace, we drop our ref */
|
||||
gst_object_unref ((GstObject *) bus);
|
||||
gst_element_set_scheduler (GST_ELEMENT (pipeline), scheduler);
|
||||
}
|
||||
|
||||
|
@ -171,6 +173,7 @@ gst_pipeline_dispose (GObject * object)
|
|||
{
|
||||
GstPipeline *pipeline = GST_PIPELINE (object);
|
||||
|
||||
gst_element_set_bus (GST_ELEMENT (pipeline), NULL);
|
||||
gst_scheduler_reset (GST_ELEMENT_SCHEDULER (object));
|
||||
gst_object_replace ((GstObject **) & pipeline->fixed_clock, NULL);
|
||||
|
||||
|
|
|
@ -879,10 +879,12 @@ prepare_link_maybe_ghosting (GstPad ** src, GstPad ** sink,
|
|||
pads_created_local = g_slist_prepend (pads_created_local, *sink);
|
||||
}
|
||||
|
||||
gst_object_unref (root);
|
||||
*pads_created = g_slist_concat (*pads_created, pads_created_local);
|
||||
return TRUE;
|
||||
|
||||
cleanup_fail:
|
||||
gst_object_unref (root);
|
||||
g_slist_foreach (pads_created_local, remove_pad, NULL);
|
||||
g_slist_free (pads_created_local);
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue