From: David Schleef Date: Mon, 21 Feb 2011 07:49:54 +0000 (-0800) Subject: oggmux,adder: Check if collectpads has been freed X-Git-Tag: RELEASE-0.10.33~193 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d150873e8b4c23d694b0351570de323b1576d76;p=platform%2Fupstream%2Fgst-plugins-base.git oggmux,adder: Check if collectpads has been freed Core now calls release_pad in finalize, which is usually after the collectpads has been unreffed. --- diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index c6ed67c..35e4448 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -462,7 +462,9 @@ gst_ogg_mux_release_pad (GstElement * element, GstPad * pad) ogg_mux = GST_OGG_MUX (gst_pad_get_parent (pad)); - gst_collect_pads_remove_pad (ogg_mux->collect, pad); + if (ogg_mux->collect) { + gst_collect_pads_remove_pad (ogg_mux->collect, pad); + } gst_element_remove_pad (element, pad); gst_object_unref (ogg_mux); diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index ab2abd7..987adbd 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -991,7 +991,9 @@ gst_adder_release_pad (GstElement * element, GstPad * pad) GST_DEBUG_OBJECT (adder, "release pad %s:%s", GST_DEBUG_PAD_NAME (pad)); - gst_collect_pads_remove_pad (adder->collect, pad); + if (adder->collect) { + gst_collect_pads_remove_pad (adder->collect, pad); + } gst_element_remove_pad (element, pad); }