typefind: require bytes before typefinding
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 24 Jul 2012 10:38:15 +0000 (12:38 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 24 Jul 2012 10:38:15 +0000 (12:38 +0200)
Require that we have some bytes in the adapter before we attempt to typefind.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680479

plugins/elements/gsttypefindelement.c

index 9aa2b8c..7674b42 100644 (file)
@@ -864,7 +864,7 @@ gst_type_find_element_chain_do_typefinding (GstTypeFindElement * typefind,
     have_min = avail >= TYPE_FIND_MIN_SIZE;
     have_max = avail >= TYPE_FIND_MAX_SIZE;
   } else {
-    have_min = TRUE;
+    have_min = avail > 0;
     have_max = TRUE;
   }