mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 08:42:32 +00:00
tests/examples/metadata/read-metadata.c: Don't leak old taglist.
Original commit message from CVS: * tests/examples/metadata/read-metadata.c: Don't leak old taglist.
This commit is contained in:
parent
70a4cad10c
commit
71ba3c6fce
2 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2008-08-05 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
|
* tests/examples/metadata/read-metadata.c:
|
||||||
|
Don't leak old taglist.
|
||||||
|
|
||||||
2008-08-05 Wim Taymans <wim.taymans@collabora.co.uk>
|
2008-08-05 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
Patch by: Olivier Crete <tester at tester dot ca>
|
Patch by: Olivier Crete <tester at tester dot ca>
|
||||||
|
|
|
@ -63,12 +63,14 @@ message_loop (GstElement * element, GstTagList ** tags)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case GST_MESSAGE_TAG:
|
case GST_MESSAGE_TAG:
|
||||||
{
|
{
|
||||||
GstTagList *new_tags;
|
GstTagList *new_tags, *old_tags;
|
||||||
|
|
||||||
gst_message_parse_tag (message, &new_tags);
|
gst_message_parse_tag (message, &new_tags);
|
||||||
if (*tags)
|
if (*tags) {
|
||||||
*tags = gst_tag_list_merge (*tags, new_tags, GST_TAG_MERGE_KEEP);
|
old_tags = *tags;
|
||||||
else
|
*tags = gst_tag_list_merge (old_tags, new_tags, GST_TAG_MERGE_KEEP);
|
||||||
|
gst_tag_list_free (old_tags);
|
||||||
|
} else
|
||||||
*tags = new_tags;
|
*tags = new_tags;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue