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);
GST_DEBUG_OBJECT (overlay, "Text pad unlinked");
if (overlay->text_collect_data) {
- gst_collect_pads_remove_pad (overlay->collect, overlay->text_sinkpad);
+ if (overlay->collect) {
+ gst_collect_pads_remove_pad (overlay->collect, overlay->text_sinkpad);
+ }
overlay->text_collect_data = NULL;
}
mux->idx = NULL;
gst_object_unref (mux->collect);
+ mux->collect = NULL;
G_OBJECT_CLASS (parent_class)->finalize (object);
}
* as it also represent number of streams present */
avipad->collect = NULL;
GST_DEBUG_OBJECT (avimux, "removed pad '%s'", GST_PAD_NAME (pad));
- gst_collect_pads_remove_pad (avimux->collect, pad);
+ if (avimux->collect) {
+ 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 */
GstFlvMux *mux = GST_FLV_MUX (object);
gst_object_unref (mux->collect);
+ mux->collect = NULL;
G_OBJECT_CLASS (parent_class)->finalize (object);
}
if (cpad && cpad->video_codec_data)
gst_buffer_unref (cpad->video_codec_data);
- gst_collect_pads_remove_pad (mux->collect, pad);
+ if (mux->collect) {
+ gst_collect_pads_remove_pad (mux->collect, pad);
+ }
gst_element_remove_pad (element, pad);
}
GST_OBJECT_UNLOCK (self->collect);
- gst_collect_pads_remove_pad (self->collect, pad);
+ if (self->collect) {
+ gst_collect_pads_remove_pad (self->collect, pad);
+ }
gst_element_remove_pad (element, pad);
}
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);
}
}
- gst_collect_pads_remove_pad (mux->collect, pad);
+ if (mux->collect) {
+ gst_collect_pads_remove_pad (mux->collect, pad);
+ }
if (gst_element_remove_pad (element, pad))
mux->num_streams--;
}
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);
mix->sinkpads = g_slist_remove (mix->sinkpads, pad);
gst_videomixer_collect_free (mixpad->mixcol);
- gst_collect_pads_remove_pad (mix->collect, pad);
+ if (mix->collect) {
+ 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);