Revert "Check that collectpads exists before removing pad"

This reverts commit 8e6b876e76.

Depends on a core commit that was reverted
This commit is contained in:
Edward Hervey 2011-02-21 12:09:07 +01:00
parent 06972db7b6
commit 6e1c701502
6 changed files with 6 additions and 23 deletions

View file

@ -208,7 +208,6 @@ gst_text_overlay_finalize (GObject * object)
gst_collect_pads_stop (overlay->collect);
gst_object_unref (overlay->collect);
overlay->collect = NULL;
g_free (overlay->text_fill_image);
g_free (overlay->text_outline_image);
@ -632,9 +631,7 @@ gst_text_overlay_text_pad_unlinked (GstPad * pad)
GST_DEBUG_OBJECT (overlay, "Text pad unlinked");
if (overlay->text_collect_data) {
if (overlay->collect) {
gst_collect_pads_remove_pad (overlay->collect, overlay->text_sinkpad);
}
gst_collect_pads_remove_pad (overlay->collect, overlay->text_sinkpad);
overlay->text_collect_data = NULL;
}

View file

@ -285,7 +285,6 @@ gst_avi_mux_finalize (GObject * object)
mux->idx = NULL;
gst_object_unref (mux->collect);
mux->collect = NULL;
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@ -1090,9 +1089,7 @@ gst_avi_mux_release_pad (GstElement * element, GstPad * pad)
* as it also represent number of streams present */
avipad->collect = NULL;
GST_DEBUG_OBJECT (avimux, "removed pad '%s'", GST_PAD_NAME (pad));
if (avimux->collect) {
gst_collect_pads_remove_pad (avimux->collect, pad);
}
gst_collect_pads_remove_pad (avimux->collect, pad);
gst_element_remove_pad (element, pad);
/* if not started yet, we can remove any sign this pad ever existed */
/* in this case _start will take care of the real pad count */

View file

@ -207,7 +207,6 @@ gst_flv_mux_finalize (GObject * object)
GstFlvMux *mux = GST_FLV_MUX (object);
gst_object_unref (mux->collect);
mux->collect = NULL;
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@ -560,9 +559,7 @@ gst_flv_mux_release_pad (GstElement * element, GstPad * pad)
if (cpad && cpad->video_codec_data)
gst_buffer_unref (cpad->video_codec_data);
if (mux->collect) {
gst_collect_pads_remove_pad (mux->collect, pad);
}
gst_collect_pads_remove_pad (mux->collect, pad);
gst_element_remove_pad (element, pad);
}

View file

@ -598,9 +598,7 @@ gst_interleave_release_pad (GstElement * element, GstPad * pad)
GST_OBJECT_UNLOCK (self->collect);
if (self->collect) {
gst_collect_pads_remove_pad (self->collect, pad);
}
gst_collect_pads_remove_pad (self->collect, pad);
gst_element_remove_pad (element, pad);
}

View file

@ -385,7 +385,6 @@ gst_matroska_mux_finalize (GObject * object)
GstMatroskaMux *mux = GST_MATROSKA_MUX (object);
gst_object_unref (mux->collect);
mux->collect = NULL;
gst_object_unref (mux->ebml_write);
if (mux->writing_app)
g_free (mux->writing_app);
@ -1930,9 +1929,7 @@ gst_matroska_mux_release_pad (GstElement * element, GstPad * pad)
}
}
if (mux->collect) {
gst_collect_pads_remove_pad (mux->collect, pad);
}
gst_collect_pads_remove_pad (mux->collect, pad);
if (gst_element_remove_pad (element, pad))
mux->num_streams--;
}

View file

@ -777,7 +777,6 @@ gst_videomixer_finalize (GObject * object)
GstVideoMixer *mix = GST_VIDEO_MIXER (object);
gst_object_unref (mix->collect);
mix->collect = NULL;
g_mutex_free (mix->state_lock);
G_OBJECT_CLASS (parent_class)->finalize (object);
@ -1252,9 +1251,7 @@ gst_videomixer_release_pad (GstElement * element, GstPad * pad)
mix->sinkpads = g_slist_remove (mix->sinkpads, pad);
gst_videomixer_collect_free (mixpad->mixcol);
if (mix->collect) {
gst_collect_pads_remove_pad (mix->collect, pad);
}
gst_collect_pads_remove_pad (mix->collect, pad);
gst_child_proxy_child_removed (GST_OBJECT (mix), GST_OBJECT (mixpad));
/* determine possibly new geometry and master */
gst_videomixer_set_master_geometry (mix);