diff --git a/gst/gstbin.c b/gst/gstbin.c index f92d305d0f..9e8f768125 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -654,6 +654,9 @@ gst_bin_dispose (GObject * object) GST_DEBUG (GST_CAT_REFCOUNTING, "dispose\n"); + if (gst_element_get_state (GST_ELEMENT (object)) == GST_STATE_PLAYING) + gst_element_set_state (GST_ELEMENT (object), GST_STATE_PAUSED); + if (bin->children) { orig = children = g_list_copy (bin->children); while (children) { diff --git a/gst/gstelement.c b/gst/gstelement.c index 20404cde54..2c8485e131 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -1374,6 +1374,8 @@ gst_element_dispose (GObject *object) GST_DEBUG_ELEMENT (GST_CAT_REFCOUNTING, element, "dispose\n"); + gst_element_set_state (element, GST_STATE_NULL); + /* first we break all our connections with the ouside */ if (element->pads) { GList *orig;