typefind: Simplify code
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 29 Apr 2013 11:03:24 +0000 (13:03 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 29 Apr 2013 11:24:56 +0000 (13:24 +0200)
This is only called when in TYPEFIND mode.

plugins/elements/gsttypefindelement.c

index c8c68c2..5ea26f8 100644 (file)
@@ -716,12 +716,10 @@ gst_type_find_element_setcaps (GstTypeFindElement * typefind, GstCaps * caps)
       GST_TYPE_FIND_MAXIMUM, caps);
 
   /* Shortcircuit typefinding if we get caps */
-  if (typefind->mode == MODE_TYPEFIND) {
-    GST_DEBUG_OBJECT (typefind, "Skipping typefinding, using caps from "
-        "upstream: %" GST_PTR_FORMAT, caps);
+  GST_DEBUG_OBJECT (typefind, "Skipping typefinding, using caps from "
+      "upstream: %" GST_PTR_FORMAT, caps);
 
-    stop_typefinding (typefind);
-  }
+  stop_typefinding (typefind);
 
   return TRUE;
 }