mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-07 19:22:15 +00:00
gst/apetag/gsttagdemux.c: ... and fix the very same leaks in GstTagDemux.
Original commit message from CVS: * gst/apetag/gsttagdemux.c: (gst_tag_demux_get_upstream_size), (gst_tag_demux_do_typefind): ... and fix the very same leaks in GstTagDemux.
This commit is contained in:
parent
a3e95ebfc9
commit
a28e6777bd
2 changed files with 13 additions and 15 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2006-02-11 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* gst/apetag/gsttagdemux.c: (gst_tag_demux_get_upstream_size),
|
||||||
|
(gst_tag_demux_do_typefind):
|
||||||
|
... and fix the very same leaks in GstTagDemux.
|
||||||
|
|
||||||
2006-02-11 Jan Schmidt <thaytan@mad.scientist.com>
|
2006-02-11 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
* gst/id3demux/gstid3demux.c: (id3demux_get_upstream_size),
|
* gst/id3demux/gstid3demux.c: (id3demux_get_upstream_size),
|
||||||
|
|
|
@ -621,7 +621,6 @@ error:
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_tag_demux_get_upstream_size (GstTagDemux * tagdemux)
|
gst_tag_demux_get_upstream_size (GstTagDemux * tagdemux)
|
||||||
{
|
{
|
||||||
GstQuery *query;
|
|
||||||
GstPad *peer = NULL;
|
GstPad *peer = NULL;
|
||||||
GstFormat format;
|
GstFormat format;
|
||||||
gint64 result;
|
gint64 result;
|
||||||
|
@ -634,21 +633,13 @@ gst_tag_demux_get_upstream_size (GstTagDemux * tagdemux)
|
||||||
if ((peer = gst_pad_get_peer (tagdemux->priv->sinkpad)) == NULL)
|
if ((peer = gst_pad_get_peer (tagdemux->priv->sinkpad)) == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
query = gst_query_new_duration (GST_FORMAT_BYTES);
|
format = GST_FORMAT_BYTES;
|
||||||
gst_query_set_duration (query, GST_FORMAT_BYTES, -1);
|
if (gst_pad_query_duration (peer, &format, &result) &&
|
||||||
|
format == GST_FORMAT_BYTES && result > 0) {
|
||||||
|
tagdemux->priv->upstream_size = result;
|
||||||
|
res = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!gst_pad_query (peer, query))
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
gst_query_parse_duration (query, &format, &result);
|
|
||||||
|
|
||||||
if (format != GST_FORMAT_BYTES || result == -1)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
tagdemux->priv->upstream_size = result;
|
|
||||||
res = TRUE;
|
|
||||||
|
|
||||||
out:
|
|
||||||
gst_object_unref (peer);
|
gst_object_unref (peer);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -1319,6 +1310,7 @@ gst_tag_demux_do_typefind (GstTagDemux * tagdemux, GstBuffer * buffer)
|
||||||
return find.caps;
|
return find.caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gst_caps_replace (&find.caps, NULL);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue