summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-07-21 11:10:04 +0100
committerTim-Philipp Müller <tim@centricular.com>2015-07-21 11:10:04 +0100
commit2be18749277ac142e1c4d7296d915c50002ab60e (patch)
tree75db0e375a3e620955b2ca851fa999d5ba2c7fd4
parent868a885040f10f10782860031b7798d6f255a8b1 (diff)
rmdemux: fix taglist leak
merge doesn't take ownership, so must unref the old tags if we do merge.
-rw-r--r--gst/realmedia/rmdemux.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/realmedia/rmdemux.c b/gst/realmedia/rmdemux.c
index f170b213..fccd823b 100644
--- a/gst/realmedia/rmdemux.c
+++ b/gst/realmedia/rmdemux.c
@@ -1930,11 +1930,15 @@ gst_rmdemux_parse_cont (GstRMDemux * rmdemux, const guint8 * data, int length)
tags = gst_rm_utils_read_tags (data, length, gst_rm_utils_read_string16);
if (tags) {
+ GstTagList *old_tags = rmdemux->pending_tags;
+
GST_LOG_OBJECT (rmdemux, "tags: %" GST_PTR_FORMAT, tags);
rmdemux->pending_tags =
- gst_tag_list_merge (rmdemux->pending_tags, tags, GST_TAG_MERGE_APPEND);
+ gst_tag_list_merge (old_tags, tags, GST_TAG_MERGE_APPEND);
+
gst_tag_list_unref (tags);
+ gst_tag_list_unref (old_tags);
}
}