diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2020-04-06 15:20:39 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2020-04-06 15:23:27 +0300 |
commit | 6ea225ccb44434a45f7a1bfaf9a96fff1c55437d (patch) | |
tree | 370b21898a136d0d8a0390186503939d3699579d /gst/typefind | |
parent | fa91783833b0f7518babc00ba08b58904d32484b (diff) | |
download | gstreamer-plugins-base-6ea225ccb44434a45f7a1bfaf9a96fff1c55437d.tar.gz |
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.
Diffstat (limited to 'gst/typefind')
-rw-r--r-- | gst/typefind/gsttypefindfunctions.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 3ed5857ff..0d6ebb618 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); } } |