diff --git a/ChangeLog b/ChangeLog index 922ecee642..31042a1940 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-08-31 Wim Taymans + + * gst/base/gstbasetransform.c: (gst_base_transform_handle_buffer): + passthrough elements can even do inplace on non writable + buffers (as they don't touch them). + 2005-08-31 Stefan Kost * check/gst-libs/controller.c: (gst_test_mono_source_get_property), diff --git a/gst/base/gstbasetransform.c b/gst/base/gstbasetransform.c index 2294853a6b..3a253713e5 100644 --- a/gst/base/gstbasetransform.c +++ b/gst/base/gstbasetransform.c @@ -815,8 +815,13 @@ gst_base_transform_handle_buffer (GstBaseTransform * trans, GstBuffer * inbuf, GST_LOG_OBJECT (trans, "... and offset NONE"); if (trans->in_place) { - /* check if we can do inplace and the buffer is writable */ - if (bclass->transform_ip && gst_buffer_is_writable (inbuf)) { + /* passthrough elements or when the buffer is writable + * can be performed with the _ip method */ + gboolean may_do_in_place = gst_buffer_is_writable (inbuf) || + trans->passthrough; + + /* check if we can and may do inplace */ + if (bclass->transform_ip && may_do_in_place) { /* in place transform and subclass supports method */ GST_LOG_OBJECT (trans, "doing inplace transform"); gst_buffer_ref (inbuf); diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index 2294853a6b..3a253713e5 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -815,8 +815,13 @@ gst_base_transform_handle_buffer (GstBaseTransform * trans, GstBuffer * inbuf, GST_LOG_OBJECT (trans, "... and offset NONE"); if (trans->in_place) { - /* check if we can do inplace and the buffer is writable */ - if (bclass->transform_ip && gst_buffer_is_writable (inbuf)) { + /* passthrough elements or when the buffer is writable + * can be performed with the _ip method */ + gboolean may_do_in_place = gst_buffer_is_writable (inbuf) || + trans->passthrough; + + /* check if we can and may do inplace */ + if (bclass->transform_ip && may_do_in_place) { /* in place transform and subclass supports method */ GST_LOG_OBJECT (trans, "doing inplace transform"); gst_buffer_ref (inbuf);