GstAdapter is not a GstObject and should be freed with g_object_unref()

This commit is contained in:
Tim-Philipp Müller 2009-08-31 13:14:02 +01:00
parent d94d572e16
commit 10d67eda7a
10 changed files with 16 additions and 15 deletions

View file

@ -171,7 +171,7 @@ gst_gme_dec_dispose (GObject * object)
GstGmeDec *gme = GST_GME_DEC (object);
if (gme->adapter) {
gst_object_unref (gme->adapter);
g_object_unref (gme->adapter);
gme->adapter = NULL;
}
}

View file

@ -306,12 +306,12 @@ gst_base_metadata_dispose_members (GstBaseMetadata * filter)
/* adapter used during parsing process */
if (filter->adapter_parsing) {
gst_object_unref (filter->adapter_parsing);
g_object_unref (filter->adapter_parsing);
filter->adapter_parsing = NULL;
}
if (filter->adapter_holding) {
gst_object_unref (filter->adapter_holding);
g_object_unref (filter->adapter_holding);
filter->adapter_holding = NULL;
}

View file

@ -177,17 +177,17 @@ metadata_dispose (MetaData ** meta_data)
metadata_chunk_array_free (&(*meta_data)->inject_chunks);
if ((*meta_data)->xmp_adapter) {
gst_object_unref ((*meta_data)->xmp_adapter);
g_object_unref ((*meta_data)->xmp_adapter);
(*meta_data)->xmp_adapter = NULL;
}
if ((*meta_data)->iptc_adapter) {
gst_object_unref ((*meta_data)->iptc_adapter);
g_object_unref ((*meta_data)->iptc_adapter);
(*meta_data)->iptc_adapter = NULL;
}
if ((*meta_data)->exif_adapter) {
gst_object_unref ((*meta_data)->exif_adapter);
g_object_unref ((*meta_data)->exif_adapter);
(*meta_data)->exif_adapter = NULL;
}

View file

@ -238,7 +238,7 @@ gst_mplex_reset (GstMplex * mplex)
if (!mpad->pad) {
g_cond_free (mpad->cond);
gst_object_unref (mpad->adapter);
g_object_unref (mpad->adapter);
g_free (mpad);
} else
nlist = g_slist_append (nlist, mpad);

View file

@ -114,7 +114,7 @@ gst_rsvg_dec_finalize (GObject * object)
GstRsvgDec *rsvg = GST_RSVG_DEC (object);
if (rsvg->adapter) {
gst_object_unref (rsvg->adapter);
g_object_unref (rsvg->adapter);
rsvg->adapter = NULL;
}

View file

@ -1516,7 +1516,7 @@ gst_aiffparse_sink_activate (GstPad * sinkpad)
gboolean res;
if (aiff->adapter)
gst_object_unref (aiff->adapter);
g_object_unref (aiff->adapter);
if (gst_pad_check_pull_range (sinkpad)) {
GST_DEBUG ("going to pull mode");

View file

@ -227,7 +227,7 @@ mpegtsmux_dispose (GObject * object)
if (mux->adapter) {
gst_adapter_clear (mux->adapter);
gst_object_unref (mux->adapter);
g_object_unref (mux->adapter);
mux->adapter = NULL;
}
if (mux->collect) {

View file

@ -45,7 +45,7 @@ mpeg_packetiser_init (MPEGPacketiser * p)
void
mpeg_packetiser_free (MPEGPacketiser * p)
{
gst_object_unref (p->adapter);
g_object_unref (p->adapter);
g_free (p->blocks);
}

View file

@ -206,7 +206,7 @@ gst_mxf_mux_reset (GstMXFMux * mux)
while ((sl = mux->collect->data) != NULL) {
GstMXFMuxPad *cpad = (GstMXFMuxPad *) sl->data;
gst_object_unref (cpad->adapter);
g_object_unref (cpad->adapter);
g_free (cpad->mapping_data);
gst_collect_pads_remove_pad (mux->collect, cpad->collect.pad);
@ -432,7 +432,7 @@ gst_mxf_mux_release_pad (GstElement * element, GstPad * pad)
/*GstMXFMux *mux = GST_MXF_MUX (GST_PAD_PARENT (pad));
GstMXFMuxPad *cpad = (GstMXFMuxPad *) gst_pad_get_element_private (pad);
gst_object_unref (cpad->adapter);
g_object_unref (cpad->adapter);
g_free (cpad->mapping_data);
gst_collect_pads_remove_pad (mux->collect, pad);

View file

@ -191,7 +191,8 @@ gst_nuv_demux_finalize (GObject * object)
gst_nuv_demux_destoy_src_pad (nuv);
gst_nuv_demux_reset (nuv);
if (nuv->adapter != NULL) {
gst_object_unref (nuv->adapter);
g_object_unref (nuv->adapter);
nuv->adapter = NULL;
}
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@ -800,7 +801,7 @@ gst_nuv_demux_sink_activate (GstPad * sinkpad)
if (gst_pad_check_pull_range (sinkpad)) {
nuv->mode = 0;
if (nuv->adapter != NULL) {
gst_object_unref (nuv->adapter);
g_object_unref (nuv->adapter);
nuv->adapter = NULL;
}
res = gst_pad_activate_pull (sinkpad, TRUE);