From 6ea225ccb44434a45f7a1bfaf9a96fff1c55437d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 6 Apr 2020 15:20:39 +0300 Subject: [PATCH] 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. --- gst/typefind/gsttypefindfunctions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 3ed5857ffd..0d6ebb6189 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -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); } }