typefinding: don't read more data than needed in MSS typefinder
authorTim-Philipp Müller <tim@centricular.com>
Sun, 26 Apr 2015 13:44:33 +0000 (14:44 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 26 Apr 2015 13:45:44 +0000 (14:45 +0100)
gst/typefind/gsttypefindfunctions.c

index eb99ef7..2aa0bf0 100644 (file)
@@ -3607,8 +3607,9 @@ mss_manifest_type_find (GstTypeFind * tf, gpointer unused)
     length = 512;
   else if (length < 64)
     return;
+  else                          /* the first few bytes should be enough */
+    length = MIN (1024, length);
 
-  /* FIXME: we probably don't need or want the entire thing.. */
   data = gst_type_find_peek (tf, 0, length);
 
   if (data == NULL)