summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-01 15:22:49 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-01 15:22:49 +0100
commite8badc068687e2c947f58efa9fadd48626c009fb (patch)
treecf223f5f229eff8c8ffa8f6be6666a58653ada90 /ext
parent33b686974e2eadecdc96646bf17e78d7f9ac81d1 (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.
Diffstat (limited to 'ext')
-rw-r--r--ext/flac/gstflacdec.c2
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);