summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2010-11-02 11:57:02 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2010-11-02 11:58:14 +0000
commit1c0b90661f91734ec88e9e2492d2a94a4a49a2c5 (patch)
tree7222352c58337827803703beadbd7c42310eebdf
parent2f46970543d707cef0dd68b743f60ea0bdff537a (diff)
tag: fix GstDateTime leak when converting exif tag to tag list
-rw-r--r--gst-libs/gst/tag/gstexiftag.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gst-libs/gst/tag/gstexiftag.c b/gst-libs/gst/tag/gstexiftag.c
index 2b2864cf3..d73859b82 100644
--- a/gst-libs/gst/tag/gstexiftag.c
+++ b/gst-libs/gst/tag/gstexiftag.c
@@ -1148,9 +1148,12 @@ parse_exif_ascii_tag (GstExifReader * reader, const GstExifTagMatch * tag,
if (sscanf (str, "%04d:%02d:%02d %02d:%02d:%02d", &year, &month, &day,
&hour, &minute, &second) > 0) {
- gst_tag_list_add (reader->taglist, GST_TAG_MERGE_REPLACE, tag->gst_tag,
- gst_date_time_new_local_time (year, month, day, hour, minute,
- second), NULL);
+ GstDateTime *d;
+
+ d = gst_date_time_new_local_time (year, month, day, hour, minute, second);
+ gst_tag_list_add (reader->taglist, GST_TAG_MERGE_REPLACE,
+ tag->gst_tag, d, NULL);
+ gst_date_time_unref (d);
} else {
GST_WARNING ("Failed to parse %s into a datetime tag", str);
}