summaryrefslogtreecommitdiffstats
path: root/ext/flac
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2006-03-13 15:49:08 +0000
committerWim Taymans <wim.taymans@gmail.com>2006-03-13 15:49:08 +0000
commit8a51401ef61672335deec8d55dfd421c06887783 (patch)
tree37e2f96f15d4238ff7126c968e91d20a2dd9b344 /ext/flac
parentb6fc5016695a8234ff2deb78bfa8addd0e8631f4 (diff)
close #333784 unref the result of gst_pad_get_parent() by: Christophe Fergeau.
Original commit message from CVS: * ext/cairo/gsttextoverlay.c: (gst_text_overlay_setcaps): * ext/esd/esdmon.c: (gst_esdmon_get): * ext/flac/gstflactag.c: (gst_flac_tag_chain): * ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_sink_setcaps), (gst_gdk_pixbuf_sink_getcaps): * ext/jpeg/gstjpegenc.c: (gst_jpegenc_getcaps), (gst_jpegenc_setcaps): * ext/jpeg/gstsmokedec.c: (gst_smokedec_chain): * ext/jpeg/gstsmokeenc.c: (gst_smokeenc_getcaps), (gst_smokeenc_setcaps): * ext/libmng/gstmngdec.c: (gst_mngdec_sinklink), (gst_mngdec_src_getcaps): * ext/libmng/gstmngenc.c: (gst_mngenc_sinklink), (gst_mngenc_chain): * ext/libpng/gstpngenc.c: (gst_pngenc_setcaps): * ext/mikmod/gstmikmod.c: (gst_mikmod_srclink): * ext/speex/gstspeexdec.c: (speex_dec_convert), (speex_dec_src_event), (speex_dec_chain): * gst/avi/gstavimux.c: (gst_avimux_vidsinkconnect), (gst_avimux_audsinkconnect), (gst_avimux_handle_event): * gst/debug/negotiation.c: (gst_negotiation_getcaps), (gst_negotiation_pad_link), (gst_negotiation_chain): * gst/flx/gstflxdec.c: (gst_flxdec_src_query_handler), (gst_flxdec_chain): * gst/interleave/deinterleave.c: (deinterleave_sink_link), (deinterleave_chain): * gst/law/mulaw-encode.c: (mulawenc_setcaps): * gst/median/gstmedian.c: (gst_median_link): * gst/monoscope/gstmonoscope.c: (gst_monoscope_srcconnect), (gst_monoscope_chain): * gst/rtp/gstrtpL16pay.c: (gst_rtpL16pay_sinkconnect): * gst/wavenc/gstwavenc.c: (gst_wavenc_sink_setcaps): * sys/osxaudio/gstosxaudiosink.c: (gst_osxaudiosink_chain): * sys/osxaudio/gstosxaudiosrc.c: (gst_osxaudiosrc_get): close #333784 unref the result of gst_pad_get_parent() by: Christophe Fergeau.
Diffstat (limited to 'ext/flac')
-rw-r--r--ext/flac/gstflactag.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/ext/flac/gstflactag.c b/ext/flac/gstflactag.c
index ffb435d2..c3f23705 100644
--- a/ext/flac/gstflactag.c
+++ b/ext/flac/gstflactag.c
@@ -289,11 +289,11 @@ gst_flac_tag_chain (GstPad * pad, GstData * data)
/* Initial state, we don't even know if we are dealing with a flac file */
if (tag->state == GST_FLAC_TAG_STATE_INIT) {
if (!caps_nego (tag)) {
- return;
+ goto cleanup;
}
if (GST_BUFFER_SIZE (tag->buffer) < sizeof (FLAC_MAGIC)) {
- return;
+ goto cleanup;
}
if (strncmp (GST_BUFFER_DATA (tag->buffer), FLAC_MAGIC,
@@ -337,7 +337,7 @@ gst_flac_tag_chain (GstPad * pad, GstData * data)
* 24 next bits: size of the metadata to follow (big endian)
*/
if (GST_BUFFER_SIZE (tag->buffer) < 4) {
- return;
+ goto cleanup;
}
is_last = (((GST_BUFFER_DATA (tag->buffer)[0]) & 0x80) == 0x80);
/* If we have metadata set on the element, the last metadata block
@@ -443,7 +443,7 @@ gst_flac_tag_chain (GstPad * pad, GstData * data)
if (tag->only_output_tags) {
send_eos (tag);
- return;
+ goto cleanup;
}
}
@@ -456,7 +456,7 @@ gst_flac_tag_chain (GstPad * pad, GstData * data)
* metadata, so just stop now
*/
send_eos (tag);
- return;
+ goto cleanup;
} else {
tag->state = GST_FLAC_TAG_STATE_ADD_VORBIS_COMMENT;
}
@@ -507,7 +507,7 @@ gst_flac_tag_chain (GstPad * pad, GstData * data)
if (buffer == NULL) {
GST_ELEMENT_ERROR (tag, CORE, TAG, (NULL),
("Error converting tag list to vorbiscomment buffer"));
- return;
+ goto cleanup;
}
size = GST_BUFFER_SIZE (buffer) - 4;
if ((size > 0xFFFFFF) || (size < 0)) {
@@ -517,7 +517,7 @@ gst_flac_tag_chain (GstPad * pad, GstData * data)
*/
GST_ELEMENT_ERROR (tag, CORE, TAG, (NULL),
("Vorbis comment of size %d too long", size));
- return;
+ goto cleanup;
}
/* Get rid of the framing bit at the end of the vorbiscomment buffer
@@ -545,12 +545,14 @@ gst_flac_tag_chain (GstPad * pad, GstData * data)
tag->state = GST_FLAC_TAG_STATE_AUDIO_DATA;
}
-
/* The metadata blocks have been read, now we are reading audio data */
if (tag->state == GST_FLAC_TAG_STATE_AUDIO_DATA) {
gst_pad_push (tag->srcpad, GST_DATA (tag->buffer));
tag->buffer = NULL;
}
+
+cleanup:
+ gst_object_unref (tag);
}