diff --git a/ChangeLog b/ChangeLog index af2b7f1c91..9463534739 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-05-13 Sebastian Dröge + + Patch by: Sjoerd Simons + + * libs/gst/base/gstbasetransform.c: + (gst_base_transform_buffer_alloc): + Check the caps of the buffer returned by gst_pad_alloc_buffer() and + fall back to default negotiation in the chain function if the caps + are different from what was requested. Fixes bug #526768. + 2008-05-09 Tim-Philipp Müller * gst/gstsegment.c: diff --git a/common b/common index dbf8f3aece..2d9c09df0f 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit dbf8f3aeceb6e57de097951a670cd853b4886ad8 +Subproject commit 2d9c09df0fe4ad3f570fea9f649cfc6c4511080d diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index c1c7b604d4..a477f13dbc 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -1214,6 +1214,13 @@ not_configured: && gst_pad_peer_accept_caps (trans->srcpad, caps)) { /* ...by seeing if the downstream elements can handle this */ res = gst_pad_alloc_buffer (trans->srcpad, offset, size, caps, buf); + + if (res == GST_FLOW_OK + && !gst_caps_is_equal (caps, GST_BUFFER_CAPS (*buf))) { + /* In case downstream wants to see something different, ignore this + * buffer and leave it to the chain function to renegotiate */ + gst_buffer_replace (buf, NULL); + } } else { /* If not fall back on the default handler and let things be * renegotiated in the chain function */