diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-07-20 14:05:27 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-08-26 10:23:18 +0200 |
commit | 341d7a4c0dbd69f86faaf1ffd2e94e99bac6f8c9 (patch) | |
tree | 14369484a33bd7284767f9c75dc64c0048be0991 | |
parent | c1988b7e55da4b4feea2c38b3b3e95116ee3b2f5 (diff) |
capsfilter: don't assume _get_caps still has to be
_set_caps only gets called when the buffer is actually pushed, so there
is a reasonably big window between when the initial caps are retrieved
and when the caps are set on our src pad. So we can't assume the not
having negotiated caps on our src pad means _get_caps still has to be
called.
Instead simply always suggest the new caps on buffer_alloc.
-rw-r--r-- | plugins/elements/gstcapsfilter.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/elements/gstcapsfilter.c b/plugins/elements/gstcapsfilter.c index a14461137..2dde28dac 100644 --- a/plugins/elements/gstcapsfilter.c +++ b/plugins/elements/gstcapsfilter.c @@ -204,9 +204,10 @@ gst_capsfilter_set_property (GObject * object, guint prop_id, } } else { GST_DEBUG_OBJECT (capsfilter, "no negotiated caps"); - /* no previous caps, the getcaps function will be used to find suitable - * caps */ - suggest = NULL; + /* Suggest the new caps, we can't just rely on _get_caps as this may + * already be called at this point even though no buffer has been + * pushed yet */ + suggest = gst_caps_copy (new_caps); } GST_OBJECT_UNLOCK (GST_BASE_TRANSFORM_SINK_PAD (object)); |