diff options
author | Vineeth TM <vineeth.tm@samsung.com> | 2015-10-05 11:21:07 +0900 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-10-07 19:04:27 +0100 |
commit | fba7bf79d8e30123be5abda183af287a14aed62b (patch) | |
tree | 20007ae113cbc5d74e4ff183a53a9bd1677ef152 | |
parent | 36f20693c1e7bcc8b0968bef91e5018d617a1f2e (diff) | |
download | gstreamer-plugins-bad-fba7bf79d8e30123be5abda183af287a14aed62b.tar.gz |
id3tag: fix sample memory leak
When getting sample from taglist, the memory is not being freed resulting in memory leak.
https://bugzilla.gnome.org/show_bug.cgi?id=756070
-rw-r--r-- | gst/id3tag/id3tag.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/id3tag/id3tag.c b/gst/id3tag/id3tag.c index 582e0695f..c12a77c59 100644 --- a/gst/id3tag/id3tag.c +++ b/gst/id3tag/id3tag.c @@ -498,8 +498,10 @@ add_id3v2frame_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, guint8 *data; gint size; - if (!gst_buffer_map (buf, &mapinfo, GST_MAP_READ)) + if (!gst_buffer_map (buf, &mapinfo, GST_MAP_READ)) { + gst_sample_unref (sample); continue; + } size = mapinfo.size; data = mapinfo.data; @@ -526,6 +528,7 @@ add_id3v2frame_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, "version"); } } + gst_sample_unref (sample); } } @@ -777,6 +780,7 @@ add_image_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, } else { GST_WARNING ("no image or caps: %p, caps=%" GST_PTR_FORMAT, image, caps); } + gst_sample_unref (sample); } } |