diff options
author | Jan Schmidt <thaytan@noraisin.net> | 2009-10-16 01:26:10 +0100 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-10-16 11:09:15 +0100 |
commit | 0fcf8001b16727cdd0e0a26f8ac5a76126a20d5d (patch) | |
tree | 61f23e9283169fde2fb764cddc2bf5f3a4e6e0f1 | |
parent | 68621dfa561aa722d1439d0c0cddb2c511de1666 (diff) |
autoconvert: Use gst_pad_peer_accept_caps instead of gst_pad_set_caps.
gst_pad_set_caps on the internal source pad always succeeds, because
caps propagate to the peer with buffers, not immediately. Using
gst_pad_peer_accept_caps properly checks whether the actual
sub-element can accept caps when they change.
https://bugzilla.gnome.org/show_bug.cgi?id=575568
-rw-r--r-- | gst/autoconvert/gstautoconvert.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/autoconvert/gstautoconvert.c b/gst/autoconvert/gstautoconvert.c index 39b9c7848..4675c4127 100644 --- a/gst/autoconvert/gstautoconvert.c +++ b/gst/autoconvert/gstautoconvert.c @@ -692,7 +692,7 @@ gst_auto_convert_sink_setcaps (GstPad * pad, GstCaps * caps) subelement = gst_auto_convert_get_subelement (autoconvert); if (subelement) { - if (gst_pad_set_caps (autoconvert->current_internal_srcpad, caps)) { + if (gst_pad_peer_accept_caps (autoconvert->current_internal_srcpad, caps)) { /* If we can set the new caps on the current element, * then we just get out */ @@ -777,7 +777,7 @@ gst_auto_convert_sink_setcaps (GstPad * pad, GstCaps * caps) internal_sinkpad_quark); /* Now we check if the element can really accept said caps */ - if (!gst_pad_set_caps (internal_srcpad, caps)) { + if (!gst_pad_peer_accept_caps (internal_srcpad, caps)) { GST_DEBUG_OBJECT (autoconvert, "Could not set %s:%s to %" GST_PTR_FORMAT, GST_DEBUG_PAD_NAME (internal_srcpad), caps); goto next_element; |