mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
libs/gst/base/gstbasetransform.c: If the element is configured in passthrough mode but the prepare_output_buffer gave...
Original commit message from CVS: * libs/gst/base/gstbasetransform.c: (gst_base_transform_prepare_output_buffer): If the element is configured in passthrough mode but the prepare_output_buffer gave us a new output buffer, discard that buffer and reuse the input buffer.
This commit is contained in:
parent
fe969e6391
commit
077d96dec3
2 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-08-18 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* libs/gst/base/gstbasetransform.c:
|
||||
(gst_base_transform_prepare_output_buffer):
|
||||
If the element is configured in passthrough mode but the
|
||||
prepare_output_buffer gave us a new output buffer, discard that buffer
|
||||
and reuse the input buffer.
|
||||
|
||||
2008-08-15 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
Patch by: Ole André Vadla Ravnås <ole.andre.ravnas at tandberg com>
|
||||
|
|
|
@ -1236,6 +1236,13 @@ gst_base_transform_prepare_output_buffer (GstBaseTransform * trans,
|
|||
*out_buf = in_buf;
|
||||
}
|
||||
} else {
|
||||
if (trans->passthrough && in_buf != *out_buf) {
|
||||
/* we are asked to perform a passthrough transform but the input and
|
||||
* output buffers are different. We have to discard the output buffer and
|
||||
* reuse the input buffer. */
|
||||
GST_DEBUG_OBJECT (trans, "passthrough but different buffers");
|
||||
discard = TRUE;
|
||||
}
|
||||
if (discard) {
|
||||
GST_DEBUG_OBJECT (trans, "discard buffer, reuse input buffer");
|
||||
gst_buffer_unref (*out_buf);
|
||||
|
|
Loading…
Reference in a new issue