mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
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:
parent
f277cd8801
commit
d3648ca534
2 changed files with 9 additions and 2 deletions
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue