mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
tag: exif: avoid adding empty strings
Fixes assertion with some jpeg files
This commit is contained in:
parent
1c5c49a94c
commit
03ba34f3a8
1 changed files with 6 additions and 4 deletions
|
@ -1285,6 +1285,7 @@ parse_exif_ascii_tag (GstExifReader * reader, const GstExifTagMatch * tag,
|
|||
GST_WARNING ("Failed to parse %s into a datetime tag", utfstr);
|
||||
}
|
||||
} else if (tagtype == G_TYPE_STRING) {
|
||||
if (utfstr[0] != '\0')
|
||||
gst_tag_list_add (reader->taglist, GST_TAG_MERGE_REPLACE, tag->gst_tag,
|
||||
utfstr, NULL);
|
||||
} else {
|
||||
|
@ -1373,6 +1374,7 @@ parse_exif_undefined_tag (GstExifReader * reader, const GstExifTagMatch * tag,
|
|||
gst_sample_unref (sample);
|
||||
gst_buffer_unref (buf);
|
||||
} else if (tagtype == G_TYPE_STRING) {
|
||||
if (data[0] != '\0')
|
||||
gst_tag_list_add (reader->taglist, GST_TAG_MERGE_REPLACE, tag->gst_tag,
|
||||
data, NULL);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue