mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
tag: fix GstDateTime leak when converting exif tag to tag list
This commit is contained in:
parent
2f46970543
commit
1c0b90661f
1 changed files with 6 additions and 3 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue