Commit d3b15f8f authored by Max Kellermann's avatar Max Kellermann

decoder/mpcdec: fix gcc warning

Move the variable "vbr_update_acc" into the #ifdef block.
parent 838f7cd2
...@@ -153,7 +153,6 @@ mpcdec_decode(struct decoder *mpd_decoder, struct input_stream *is) ...@@ -153,7 +153,6 @@ mpcdec_decode(struct decoder *mpd_decoder, struct input_stream *is)
mpc_uint32_t ret; mpc_uint32_t ret;
int32_t chunk[G_N_ELEMENTS(sample_buffer)]; int32_t chunk[G_N_ELEMENTS(sample_buffer)];
long bit_rate = 0; long bit_rate = 0;
mpc_uint32_t vbr_update_acc;
mpc_uint32_t vbr_update_bits; mpc_uint32_t vbr_update_bits;
enum decoder_command cmd = DECODE_COMMAND_NONE; enum decoder_command cmd = DECODE_COMMAND_NONE;
...@@ -243,10 +242,11 @@ mpcdec_decode(struct decoder *mpd_decoder, struct input_stream *is) ...@@ -243,10 +242,11 @@ mpcdec_decode(struct decoder *mpd_decoder, struct input_stream *is)
decoder_seek_error(mpd_decoder); decoder_seek_error(mpd_decoder);
} }
vbr_update_acc = 0;
vbr_update_bits = 0; vbr_update_bits = 0;
#ifdef MPC_IS_OLD_API #ifdef MPC_IS_OLD_API
mpc_uint32_t vbr_update_acc = 0;
ret = mpc_decoder_decode(&decoder, sample_buffer, ret = mpc_decoder_decode(&decoder, sample_buffer,
&vbr_update_acc, &vbr_update_bits); &vbr_update_acc, &vbr_update_bits);
if (ret == 0 || ret == (mpc_uint32_t)-1) if (ret == 0 || ret == (mpc_uint32_t)-1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment