From 8798ea2cca9f344bd40818bdad51846b349f2af2 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 27 Oct 2008 15:02:48 +0000 Subject: [PATCH] libs/gst/base/gstbasetransform.c: If we have a fixate function, call it even if we already have fixed caps because th... Original commit message from CVS: * libs/gst/base/gstbasetransform.c: (gst_base_transform_find_transform), (gst_base_transform_getrange): If we have a fixate function, call it even if we already have fixed caps because the subclass might add some caps. Makes audioconvert add a default channel layout. --- ChangeLog | 8 ++++++++ libs/gst/base/gstbasetransform.c | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2d4607136e..a4c3997538 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-10-27 Wim Taymans + + * libs/gst/base/gstbasetransform.c: + (gst_base_transform_find_transform), (gst_base_transform_getrange): + If we have a fixate function, call it even if we already have fixed caps + because the subclass might add some caps. Makes audioconvert add a + default channel layout. + 2008-10-24 Wim Taymans * libs/gst/base/gstbasetransform.c: diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index cc61e27d2e..59ef71db48 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -896,6 +896,18 @@ gst_base_transform_find_transform (GstBaseTransform * trans, GstPad * pad, gst_pad_fixate_caps (otherpad, othercaps); } GST_DEBUG_OBJECT (trans, "after fixating %" GST_PTR_FORMAT, othercaps); + } else { + /* else caps are fixed but the subclass may want to add fields */ + if (klass->fixate_caps) { + othercaps = gst_caps_make_writable (othercaps); + + GST_DEBUG_OBJECT (trans, "doing fixate %" GST_PTR_FORMAT + " using caps %" GST_PTR_FORMAT + " on pad %s:%s using fixate_caps vmethod", othercaps, caps, + GST_DEBUG_PAD_NAME (otherpad)); + + klass->fixate_caps (trans, GST_PAD_DIRECTION (pad), caps, othercaps); + } } /* caps should be fixed now, if not we have to fail. */