xvimagesink: Make sure that the caps for upstream negotiation are simple caps
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 10 Oct 2010 16:35:54 +0000 (18:35 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 10 Oct 2010 16:35:54 +0000 (18:35 +0200)
Fixes bug #631774.

sys/xvimage/xvimagesink.c

index abf12ae..aa53bcb 100644 (file)
@@ -2536,9 +2536,6 @@ gst_xvimagesink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size,
   /* Check the caps against our xcontext */
   intersection = gst_caps_intersect (xvimagesink->xcontext->caps, caps);
 
-  /* Ensure the returned caps are fixed */
-  gst_caps_truncate (intersection);
-
   GST_DEBUG_OBJECT (xvimagesink, "intersection in buffer alloc returned %"
       GST_PTR_FORMAT, intersection);
 
@@ -2606,6 +2603,9 @@ gst_xvimagesink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size,
       goto incompatible;
   }
 
+  /* Ensure the returned caps are fixed */
+  gst_caps_truncate (intersection);
+
   GST_DEBUG_OBJECT (xvimagesink, "allocating a buffer with caps %"
       GST_PTR_FORMAT, intersection);
   if (gst_caps_is_equal (intersection, caps)) {