typefind/xdgmime: Validate mimetypes to be valid GstStructure names before using...
authorSebastian Dröge <sebastian@centricular.com>
Sat, 17 Oct 2020 07:42:49 +0000 (10:42 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Sat, 17 Oct 2020 07:42:49 +0000 (10:42 +0300)
commit3036521fb6f0f6fc86e5c893837d936e2675e58b
tree50759f88d9c3ddcea880a2a226e2451075181460
parent967e650937bc7ba3692f7dc1031554d8961b8823
typefind/xdgmime: Validate mimetypes to be valid GstStructure names before using them

On macOS, for example, "text/*" can be returned as mimetype for
plaintext files but we don't allow '*' in structure names and this would
cause critical warnings.

It's a valid mimetype but not a valid structure name.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/616

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/875>
gst/typefind/gsttypefindfunctions.c