Commit 1c0b9066 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

tag: fix GstDateTime leak when converting exif tag to tag list

parent 2f469705
...@@ -1148,9 +1148,12 @@ parse_exif_ascii_tag (GstExifReader * reader, const GstExifTagMatch * tag, ...@@ -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, if (sscanf (str, "%04d:%02d:%02d %02d:%02d:%02d", &year, &month, &day,
&hour, &minute, &second) > 0) { &hour, &minute, &second) > 0) {
gst_tag_list_add (reader->taglist, GST_TAG_MERGE_REPLACE, tag->gst_tag, GstDateTime *d;
gst_date_time_new_local_time (year, month, day, hour, minute,
second), NULL); 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 { } else {
GST_WARNING ("Failed to parse %s into a datetime tag", str); GST_WARNING ("Failed to parse %s into a datetime tag", str);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment