After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 574805 - [capsfilter] Doesn't reset the internal suggestion with ANY or NULL caps
[capsfilter] Doesn't reset the internal suggestion with ANY or NULL caps
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-10 18:39 UTC by Edward Hervey
Modified: 2009-03-31 13:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Always call gst_base_transform_suggest (803 bytes, patch)
2009-03-10 18:54 UTC, Edward Hervey
committed Details | Review

Description Edward Hervey 2009-03-10 18:39:55 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.
Comment 1 Edward Hervey 2009-03-10 18:54:03 UTC
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.
Comment 2 Edward Hervey 2009-03-31 13:11:18 UTC
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: