typefindfunctions: Fix otio typefinder detecting anything with curly braces at the...
authorSebastian Dröge <sebastian@centricular.com>
Mon, 6 Apr 2020 12:14:41 +0000 (15:14 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 6 Apr 2020 12:20:22 +0000 (15:20 +0300)
memcmp() returns 0 (aka FALSE) on match and a difference otherwise.

Previously the typefinder was matching on anything but otio files that
happened to have some curly braces in the beginning of the file.

Fixes a false positive with a MOV file.

gst/typefind/gsttypefindfunctions.c

index 05b1146..3ed5857 100644 (file)
@@ -759,7 +759,7 @@ otio_type_find (GstTypeFind * tf, gpointer unused)
   if (!data)
     return;
 
-  if (memcmp (data, "\"OTIO_SCHEMA\":", 15)) {
+  if (memcmp (data, "\"OTIO_SCHEMA\":", 15) == 0) {
     gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, OTIO_CAPS);
   }
 }