mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-07 23:12:42 +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,8 +1285,9 @@ parse_exif_ascii_tag (GstExifReader * reader, const GstExifTagMatch * tag,
|
||||||
GST_WARNING ("Failed to parse %s into a datetime tag", utfstr);
|
GST_WARNING ("Failed to parse %s into a datetime tag", utfstr);
|
||||||
}
|
}
|
||||||
} else if (tagtype == G_TYPE_STRING) {
|
} else if (tagtype == G_TYPE_STRING) {
|
||||||
gst_tag_list_add (reader->taglist, GST_TAG_MERGE_REPLACE, tag->gst_tag,
|
if (utfstr[0] != '\0')
|
||||||
utfstr, NULL);
|
gst_tag_list_add (reader->taglist, GST_TAG_MERGE_REPLACE, tag->gst_tag,
|
||||||
|
utfstr, NULL);
|
||||||
} else {
|
} else {
|
||||||
GST_WARNING ("No parsing function associated to %x(%s)", tag->exif_tag,
|
GST_WARNING ("No parsing function associated to %x(%s)", tag->exif_tag,
|
||||||
tag->gst_tag);
|
tag->gst_tag);
|
||||||
|
@ -1373,8 +1374,9 @@ parse_exif_undefined_tag (GstExifReader * reader, const GstExifTagMatch * tag,
|
||||||
gst_sample_unref (sample);
|
gst_sample_unref (sample);
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
} else if (tagtype == G_TYPE_STRING) {
|
} else if (tagtype == G_TYPE_STRING) {
|
||||||
gst_tag_list_add (reader->taglist, GST_TAG_MERGE_REPLACE, tag->gst_tag,
|
if (data[0] != '\0')
|
||||||
data, NULL);
|
gst_tag_list_add (reader->taglist, GST_TAG_MERGE_REPLACE, tag->gst_tag,
|
||||||
|
data, NULL);
|
||||||
} else {
|
} else {
|
||||||
GST_WARNING ("No parsing function associated to %x(%s)", tag->exif_tag,
|
GST_WARNING ("No parsing function associated to %x(%s)", tag->exif_tag,
|
||||||
tag->gst_tag);
|
tag->gst_tag);
|
||||||
|
|
Loading…
Reference in a new issue