summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVineeth TM <vineeth.tm@samsung.com>2015-07-21 12:44:55 +0900
committerTim-Philipp Müller <tim@centricular.com>2015-07-21 10:52:54 +0100
commit868a885040f10f10782860031b7798d6f255a8b1 (patch)
tree5e8c9a4776ae4fbed89df4cc7f303bb78f4ca5fb
parent42dbce6d578469e2f7c6731c0d85d090341b2724 (diff)
rmdemux: fix wrong unref when there are no tags
Tags should be appended to pending tags and unref'ed only if tags are present. Else there is no need to append. https://bugzilla.gnome.org/show_bug.cgi?id=752404
-rw-r--r--gst/realmedia/rmdemux.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gst/realmedia/rmdemux.c b/gst/realmedia/rmdemux.c
index 08b798bf..f170b213 100644
--- a/gst/realmedia/rmdemux.c
+++ b/gst/realmedia/rmdemux.c
@@ -1929,11 +1929,13 @@ gst_rmdemux_parse_cont (GstRMDemux * rmdemux, const guint8 * data, int length)
tags = gst_rm_utils_read_tags (data, length, gst_rm_utils_read_string16);
- GST_LOG_OBJECT (rmdemux, "tags: %" GST_PTR_FORMAT, tags);
+ if (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_unref (tags);
+ rmdemux->pending_tags =
+ gst_tag_list_merge (rmdemux->pending_tags, tags, GST_TAG_MERGE_APPEND);
+ gst_tag_list_unref (tags);
+ }
}
static void