gst-libs/gst/tag/gsttagdemux.c: Don't leak caps.

Original commit message from CVS:
* gst-libs/gst/tag/gsttagdemux.c:
Don't leak caps.
This commit is contained in:
Tim-Philipp Müller 2007-10-06 16:49:55 +00:00
parent f277cd8801
commit d3648ca534
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2007-10-06 Tim-Philipp Müller <tim at centricular dot net>
* gst-libs/gst/tag/gsttagdemux.c:
Don't leak caps.
2007-10-06 Tim-Philipp Müller <tim at centricular dot net>
* gst-libs/gst/tag/Makefile.am:

View file

@ -296,6 +296,7 @@ gst_tag_demux_add_srcpad (GstTagDemux * tagdemux, GstCaps * new_caps)
!gst_caps_is_equal (new_caps, tagdemux->priv->src_caps)) {
gst_caps_replace (&tagdemux->priv->src_caps, new_caps);
if (tagdemux->priv->srcpad != NULL) {
GST_DEBUG_OBJECT (tagdemux, "Changing src pad caps to %" GST_PTR_FORMAT,
tagdemux->priv->src_caps);
@ -304,7 +305,6 @@ gst_tag_demux_add_srcpad (GstTagDemux * tagdemux, GstCaps * new_caps)
}
} else {
/* Caps never changed */
gst_caps_unref (new_caps);
}
if (tagdemux->priv->srcpad == NULL) {
@ -1174,7 +1174,6 @@ gst_tag_demux_sink_activate (GstPad * sinkpad)
demux->priv->state = GST_TAG_DEMUX_STREAMING;
/* 6 Add the srcpad for output now we know caps. */
/* add_srcpad takes ownership of the caps */
if (!gst_tag_demux_add_srcpad (demux, caps)) {
GST_DEBUG_OBJECT (demux, "Could not add source pad");
goto done_activate;
@ -1190,6 +1189,9 @@ gst_tag_demux_sink_activate (GstPad * sinkpad)
done_activate:
if (caps)
gst_caps_unref (caps);
return ret;
}