videomixer: Do not check if caps are empty when they are NULL
authorThibault Saunier <thibault.saunier@collabora.com>
Wed, 11 Sep 2013 17:32:17 +0000 (14:32 -0300)
committerThibault Saunier <thibault.saunier@collabora.com>
Wed, 11 Sep 2013 17:33:31 +0000 (14:33 -0300)
In the case the caps are actually NULL, we should just concider it the
same way as empty caps in that case.

gst/videomixer/videomixer2.c

index ce3ba0a04225b99642183e1dc195a50f446093f2..c12f036813c82c6f02c5de18e2ec83181f462362 100644 (file)
@@ -312,7 +312,7 @@ gst_videomixer2_update_converters (GstVideoMixer2 * mix)
 
   downstream_caps = gst_pad_get_allowed_caps (mix->srcpad);
 
-  if (gst_caps_is_empty (downstream_caps))
+  if (!downstream_caps || gst_caps_is_empty (downstream_caps))
     return FALSE;
 
   /* first find new preferred format */