mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-05 15:08:48 +00:00
exiftag: Check the result of gst_date_time_new_local_time
Fixes a critical warning when parsing a JPEG containing a malformed `DateTime` tag (like `0000:00:00 00:00:00`). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7713>
This commit is contained in:
parent
6604421cba
commit
8131c3eb1d
1 changed files with 7 additions and 3 deletions
|
@ -1303,9 +1303,13 @@ parse_exif_ascii_tag (GstExifReader * reader, const GstExifTagMatch * tag,
|
|||
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);
|
||||
if (d) {
|
||||
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", utfstr);
|
||||
}
|
||||
} else {
|
||||
GST_WARNING ("Failed to parse %s into a datetime tag", utfstr);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue