basetransform: Fall back to upstream provided caps if fixation of suggested caps...
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 8 Dec 2011 16:07:05 +0000 (17:07 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 8 Dec 2011 17:11:43 +0000 (18:11 +0100)
libs/gst/base/gstbasetransform.c

index 409b999..9acb942 100644 (file)
@@ -1937,8 +1937,11 @@ gst_base_transform_buffer_alloc (GstPad * pad, guint64 offset, guint size,
         gst_pad_fixate_caps (GST_BASE_TRANSFORM_SINK_PAD (trans), sink_suggest);
 
         if (!gst_caps_is_fixed (sink_suggest)) {
-          gst_caps_unref (sink_suggest);
-          sink_suggest = NULL;
+          GST_DEBUG_OBJECT (trans,
+              "Impossible to fixate caps, using upstream caps");
+          gst_caps_replace (&sink_suggest, caps);
+          size_suggest = size;
+          suggest = FALSE;
         }
 
         GST_DEBUG_OBJECT (trans, "Caps fixed to: %" GST_PTR_FORMAT,