ext/vorbis/vorbisdec.c: gst_tag_list_merge() returns a new object. Take that into account when using it. This avoids ...
Original commit message from CVS: * ext/vorbis/vorbisdec.c: (vorbis_dec_finalize), (vorbis_handle_comment_packet): gst_tag_list_merge() returns a new object. Take that into account when using it. This avoids memleak. Revert previous commit which is not needed.
This commit is contained in:
parent
8642c1dc9d
commit
31ce9d42b0
@ -1,3 +1,11 @@
|
|||||||
|
2006-07-12 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
|
* ext/vorbis/vorbisdec.c: (vorbis_dec_finalize),
|
||||||
|
(vorbis_handle_comment_packet):
|
||||||
|
gst_tag_list_merge() returns a new object. Take that into account when
|
||||||
|
using it. This avoids memleak.
|
||||||
|
Revert previous commit which is not needed.
|
||||||
|
|
||||||
2006-07-12 Edward Hervey <edward@fluendo.com>
|
2006-07-12 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
* ext/vorbis/vorbisdec.c: (vorbis_dec_finalize):
|
* ext/vorbis/vorbisdec.c: (vorbis_dec_finalize):
|
||||||
|
@ -98,8 +98,6 @@ static gboolean vorbis_dec_convert (GstPad * pad,
|
|||||||
|
|
||||||
static gboolean vorbis_dec_sink_query (GstPad * pad, GstQuery * query);
|
static gboolean vorbis_dec_sink_query (GstPad * pad, GstQuery * query);
|
||||||
|
|
||||||
static void gst_vorbis_dec_reset (GstVorbisDec * dec);
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_vorbis_dec_base_init (gpointer g_class)
|
gst_vorbis_dec_base_init (gpointer g_class)
|
||||||
{
|
{
|
||||||
@ -183,8 +181,6 @@ vorbis_dec_finalize (GObject * object)
|
|||||||
vorbis_comment_clear (&vd->vc);
|
vorbis_comment_clear (&vd->vc);
|
||||||
vorbis_info_clear (&vd->vi);
|
vorbis_info_clear (&vd->vi);
|
||||||
|
|
||||||
gst_vorbis_dec_reset (vd);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -660,6 +656,7 @@ vorbis_handle_comment_packet (GstVorbisDec * vd, ogg_packet * packet)
|
|||||||
{
|
{
|
||||||
guint bitrate = 0;
|
guint bitrate = 0;
|
||||||
gchar *encoder = NULL;
|
gchar *encoder = NULL;
|
||||||
|
GstTagList *list;
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (vd, "parsing comment packet");
|
GST_DEBUG_OBJECT (vd, "parsing comment packet");
|
||||||
@ -667,11 +664,13 @@ vorbis_handle_comment_packet (GstVorbisDec * vd, ogg_packet * packet)
|
|||||||
buf = gst_buffer_new_and_alloc (packet->bytes);
|
buf = gst_buffer_new_and_alloc (packet->bytes);
|
||||||
GST_BUFFER_DATA (buf) = packet->packet;
|
GST_BUFFER_DATA (buf) = packet->packet;
|
||||||
|
|
||||||
vd->taglist =
|
list =
|
||||||
gst_tag_list_merge (vd->taglist,
|
|
||||||
gst_tag_list_from_vorbiscomment_buffer (buf, (guint8 *) "\003vorbis", 7,
|
gst_tag_list_from_vorbiscomment_buffer (buf, (guint8 *) "\003vorbis", 7,
|
||||||
&encoder), GST_TAG_MERGE_REPLACE);
|
&encoder);
|
||||||
|
|
||||||
|
vd->taglist = gst_tag_list_merge (vd->taglist, list, GST_TAG_MERGE_REPLACE);
|
||||||
|
|
||||||
|
gst_tag_list_free (list);
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
|
|
||||||
if (!vd->taglist) {
|
if (!vd->taglist) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user