aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/MpcdecDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-08-05 23:10:39 +0200
committerMax Kellermann <max@duempel.org>2015-08-05 23:10:39 +0200
commite384fa226eec299b1db5667c8cc940b3689c879c (patch)
tree3785b8ea21fa527b678b41645700c9a1813d40dc /src/decoder/plugins/MpcdecDecoderPlugin.cxx
parentcbb595ba83b91df1bf54b2b6cfa451d37dbd0e0c (diff)
downloadmpd-e384fa226eec299b1db5667c8cc940b3689c879c.tar.gz
mpd-e384fa226eec299b1db5667c8cc940b3689c879c.tar.xz
mpd-e384fa226eec299b1db5667c8cc940b3689c879c.zip
decoder/mpcdec: make buffer more local
Allow the compiler to invalidate buffer contents.
Diffstat (limited to '')
-rw-r--r--src/decoder/plugins/MpcdecDecoderPlugin.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/decoder/plugins/MpcdecDecoderPlugin.cxx b/src/decoder/plugins/MpcdecDecoderPlugin.cxx
index c87377dd6..4d1ad3bbf 100644
--- a/src/decoder/plugins/MpcdecDecoderPlugin.cxx
+++ b/src/decoder/plugins/MpcdecDecoderPlugin.cxx
@@ -136,8 +136,6 @@ mpc_to_mpd_buffer(int32_t *dest, const MPC_SAMPLE_FORMAT *src,
static void
mpcdec_decode(Decoder &mpd_decoder, InputStream &is)
{
- MPC_SAMPLE_FORMAT sample_buffer[MPC_DECODER_BUFFER_LENGTH];
-
mpc_decoder_data data(is, &mpd_decoder);
mpc_reader reader;
@@ -199,6 +197,7 @@ mpcdec_decode(Decoder &mpd_decoder, InputStream &is)
mpc_uint32_t vbr_update_bits = 0;
+ MPC_SAMPLE_FORMAT sample_buffer[MPC_DECODER_BUFFER_LENGTH];
mpc_frame_info frame;
frame.buffer = (MPC_SAMPLE_FORMAT *)sample_buffer;
mpc_status status = mpc_demux_decode(demux, &frame);