typefindfunctions: Fix otio typefinder to actually detect otio files

The string "\"OTIO_SCHEMA\":" is 14 characters and not 15. Checking for
15 characters would also check for the final '\0', which does not exist
in any otio file as the string is the key of a JSON map.
This commit is contained in:
Sebastian Dröge 2020-04-06 15:20:39 +03:00
parent fa91783833
commit 6ea225ccb4

View file

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