typefindfunctions: Check for NULL return of gst_type_find_peek() instead of segfaulting in otio typefinder

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/329#note_194943
This commit is contained in:
Sebastian Dröge 2019-07-23 13:54:24 +03:00
parent ba9ef3c50e
commit 6cc32a39e7

View file

@ -756,6 +756,9 @@ otio_type_find (GstTypeFind * tf, gpointer unused)
return;
data = (const gchar *) gst_type_find_peek (tf, tmp - data, 15);
if (!data)
return;
if (memcmp (data, "\"OTIO_SCHEMA\":", 15)) {
gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, OTIO_CAPS);
}