videomixer: if we're not linked downstream, we can do any format
authorEdward Hervey <bilboed@bilboed.com>
Fri, 4 Jun 2010 09:44:09 +0000 (11:44 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 4 Jun 2010 09:44:09 +0000 (11:44 +0200)
Stupid me, assuming _get_allowed_caps() would actually return the
pad templates if there was no peer.

gst/videomixer/videomixer.c

index 1f57565..22740e6 100644 (file)
@@ -391,6 +391,10 @@ gst_videomixer_pad_sink_getcaps (GstPad * pad)
 
   /* Get downstream allowed caps */
   res = gst_pad_get_allowed_caps (mix->srcpad);
+  if (G_UNLIKELY (res == NULL)) {
+    res = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
+    goto beach;
+  }
 
   GST_VIDEO_MIXER_STATE_LOCK (mix);