ext/: GstObjects must be unref'ed with gst_object_unref() instead of g_object_unref(), otherwise things break for GLi...

Original commit message from CVS:
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_loop):
* ext/libmms/gstmms.c: (gst_mms_src_query), (gst_mms_create):
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_src_query),
(gst_musepackdec_loop):
* ext/swfdec/gstswfdec.c: (gst_swfdec_video_link),
(gst_swfdec_src_query):
* ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_src_query):
GstObjects must be unref'ed with gst_object_unref() instead of
g_object_unref(), otherwise things break for GLib-2.6 users.
This commit is contained in:
Tim-Philipp Müller 2005-12-12 10:40:42 +00:00
parent dfa22f08c6
commit 6435014c26
6 changed files with 31 additions and 16 deletions

View file

@ -1,3 +1,15 @@
2005-12-12 Tim-Philipp Müller <tim at centricular dot net>
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_loop):
* ext/libmms/gstmms.c: (gst_mms_src_query), (gst_mms_create):
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_src_query),
(gst_musepackdec_loop):
* ext/swfdec/gstswfdec.c: (gst_swfdec_video_link),
(gst_swfdec_src_query):
* ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_src_query):
GstObjects must be unref'ed with gst_object_unref() instead of
g_object_unref(), otherwise things break for GLib-2.6 users.
2005-12-12 David Schleef <ds@schleef.org>
* ext/swfdec/gstswfdec.c: (gst_swfdecbuffer_get_type),

View file

@ -653,7 +653,7 @@ gst_ivorbisfile_loop (GstPad * pad)
gint link;
if (ivorbisfile->eos) {
g_object_unref (ivorbisfile);
gst_object_unref (ivorbisfile);
return;
}
@ -664,7 +664,7 @@ gst_ivorbisfile_loop (GstPad * pad)
if (ivorbisfile->adapter) {
if (gst_adapter_available (ivorbisfile->adapter) < 40960) {
g_object_unref (ivorbisfile);
gst_object_unref (ivorbisfile);
return;
}
}
@ -681,7 +681,7 @@ gst_ivorbisfile_loop (GstPad * pad)
if ((err = ov_open_callbacks (ivorbisfile, &ivorbisfile->vf, NULL, 0,
ivorbisfile_ov_callbacks)) < 0) {
GST_ELEMENT_ERROR (ivorbisfile, STREAM, DECODE, (NULL), (NULL));
g_object_unref (ivorbisfile);
gst_object_unref (ivorbisfile);
return;
}
@ -744,7 +744,7 @@ gst_ivorbisfile_loop (GstPad * pad)
if (!gst_ivorbisfile_new_link (ivorbisfile, ivorbisfile->vf.current_link)) {
GST_ELEMENT_ERROR (ivorbisfile, CORE, NEGOTIATION, (NULL), (NULL));
}
g_object_unref (ivorbisfile);
gst_object_unref (ivorbisfile);
return;
}
@ -765,12 +765,12 @@ gst_ivorbisfile_loop (GstPad * pad)
ivorbisfile->restart = TRUE;
gst_pad_push_event (ivorbisfile->srcpad, gst_event_new_eos ());
}
g_object_unref (ivorbisfile);
gst_object_unref (ivorbisfile);
return;
} else if (ret < 0) {
g_warning ("ivorbisfile: decoding error");
gst_buffer_unref (outbuf);
g_object_unref (ivorbisfile);
gst_object_unref (ivorbisfile);
return;
} else {
if (ivorbisfile->need_discont) {
@ -791,7 +791,7 @@ gst_ivorbisfile_loop (GstPad * pad)
if (NULL == GST_PAD_CAPS (ivorbisfile->srcpad)) {
gst_buffer_unref (outbuf);
g_object_unref (ivorbisfile);
gst_object_unref (ivorbisfile);
return;
}

View file

@ -215,7 +215,7 @@ gst_mms_src_query (GstPad * pad, GstQuery * query)
break;
}
g_object_unref (mmssrc);
gst_object_unref (mmssrc);
return res;
}
@ -279,7 +279,7 @@ gst_mms_create (GstPushSrc * psrc, GstBuffer ** buf)
if (!gst_pad_send_event (peer, gst_event_new_eos ())) {
ret = GST_FLOW_ERROR;
}
g_object_unref (peer);
gst_object_unref (peer);
goto done;
}

View file

@ -351,7 +351,7 @@ gst_musepackdec_src_query (GstPad * pad, GstQuery * query)
}
done:
g_object_unref (musepackdec);
gst_object_unref (musepackdec);
return res;
}
@ -557,6 +557,9 @@ gst_musepackdec_loop (GstPad * sinkpad)
GST_FORMAT_DEFAULT, musepackdec->pos, &fmt, &value);
GST_BUFFER_TIMESTAMP (out) = value;
GST_DEBUG ("Pushing buffer, timestamp %" GST_TIME_FORMAT,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (out)));
musepackdec->pos += GST_BUFFER_SIZE (out) / musepackdec->bps;
gst_buffer_set_caps (out, GST_PAD_CAPS (musepackdec->srcpad));
gst_pad_push (musepackdec->srcpad, out);

View file

@ -287,7 +287,7 @@ gst_swfdec_video_link (GstPad * pad, GstCaps * caps)
res = TRUE;
}
g_object_unref (swfdec);
gst_object_unref (swfdec);
return res;
}
@ -669,7 +669,7 @@ gst_swfdec_src_query (GstPad * pad, GstQuery * query)
break;
}
g_object_unref (swfdec);
gst_object_unref (swfdec);
return res;
}

View file

@ -159,7 +159,7 @@ gst_wavpack_parse_src_query (GstPad * pad, GstQuery * query)
if (format == GST_FORMAT_TIME) {
value = wavpackparse->timestamp;
gst_query_set_duration (query, format, value);
g_object_unref (wavpackparse);
gst_object_unref (wavpackparse);
ret = TRUE;
break;
}
@ -171,20 +171,20 @@ gst_wavpack_parse_src_query (GstPad * pad, GstQuery * query)
if (wavpackparse->total_samples == 0) {
value = 0;
gst_query_set_duration (query, format, value);
g_object_unref (wavpackparse);
gst_object_unref (wavpackparse);
ret = FALSE;
break;
}
value = ((gdouble) wavpackparse->total_samples /
(gdouble) wavpackparse->samplerate) * GST_SECOND;
gst_query_set_duration (query, format, value);
g_object_unref (wavpackparse);
gst_object_unref (wavpackparse);
ret = TRUE;
break;
}
break;
default:
g_object_unref (wavpackparse);
gst_object_unref (wavpackparse);
ret = gst_pad_query_default (pad, query);
break;
}