GNOME Bugzilla – Bug 574805
[capsfilter] Doesn't reset the internal suggestion with ANY or NULL caps
Last modified: 2009-03-31 13:11:18 UTC
When settings the caps property of capsfilter to ANY or NULL when it was already negotiated, the code doesn't reset itself. At a closer look, the problem seems to be that if we have no suggestions, capsfilter doesn't remove the previously set suggestion at the BaseTransform level... and the next time negotiation happens through the capsfilter it uses the previously configured caps instead of retrying a full negotiation. Patch follows.
Created attachment 130424 [details] [review] Always call gst_base_transform_suggest This makes sure we always inform basetransform of our suggestion, including in the case where it's NULL.
commit ca662eb57a64b9d74448f523ecca64ef83fa627b Author: Edward Hervey <bilboed@bilboed.com> Date: Thu Mar 26 17:25:08 2009 +0100 capsfilter. Always calls _suggest, even with NULL caps. Fixes #574805 diff --git a/plugins/elements/gstcapsfilter.c b/plugins/elements/gstcapsfilter.c index afa1ff5..3442ff3 100644 --- a/plugins/elements/gstcapsfilter.c +++ b/plugins/elements/gstcapsfilter.c @@ -200,12 +200,12 @@ gst_capsfilter_set_property (GObject * object, guint prop_id, } GST_OBJECT_UNLOCK (GST_BASE_TRANSFORM_SINK_PAD (object)); - if (suggest) { - GST_DEBUG_OBJECT (capsfilter, "suggest new caps %" GST_PTR_FORMAT, - suggest); - gst_base_transform_suggest (GST_BASE_TRANSFORM (object), suggest, 0); + GST_DEBUG_OBJECT (capsfilter, "suggesting new caps %" GST_PTR_FORMAT, + suggest); + gst_base_transform_suggest (GST_BASE_TRANSFORM (object), suggest, 0); + if (suggest) gst_caps_unref (suggest); - } + break; } default: