diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-08-01 15:22:49 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-08-01 15:22:49 +0100 |
commit | e8badc068687e2c947f58efa9fadd48626c009fb (patch) | |
tree | cf223f5f229eff8c8ffa8f6be6666a58653ada90 | |
parent | 33b686974e2eadecdc96646bf17e78d7f9ac81d1 (diff) |
flacdec: use gst_adapter_copy() to avoid unnecessary buffer merges
gst_adapter_peek() will merge buffers as needed, which we can avoid
here since we're doing a memcpy anyway and then flush the copied
data from the adapter right away.
-rw-r--r-- | ext/flac/gstflacdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c index 50e29031..7905a746 100644 --- a/ext/flac/gstflacdec.c +++ b/ext/flac/gstflacdec.c @@ -809,7 +809,7 @@ gst_flac_dec_read_stream (const FLAC__StreamDecoder * decoder, GST_LOG_OBJECT (dec, "feeding %u bytes to decoder (available=%u, bytes=%u)", len, gst_adapter_available (dec->adapter), (guint) * bytes); - memcpy (buffer, gst_adapter_peek (dec->adapter, len), len); + gst_adapter_copy (dec->adapter, buffer, 0, len); *bytes = len; gst_adapter_flush (dec->adapter, len); |