Commit de588448 authored by Max Kellermann's avatar Max Kellermann

mp3: return from mp3_synth_and_send() on any command

Previously, the function would only return when a STOP was issued. It makes more sense to consider all possible commands.
parent 6158858f
...@@ -905,7 +905,7 @@ mp3_send_pcm(struct mp3_data *data, unsigned i, unsigned pcm_length, ...@@ -905,7 +905,7 @@ mp3_send_pcm(struct mp3_data *data, unsigned i, unsigned pcm_length,
data->elapsed_time, data->elapsed_time,
data->bit_rate / 1000, data->bit_rate / 1000,
replay_gain_info); replay_gain_info);
if (cmd == DECODE_COMMAND_STOP) if (cmd != DECODE_COMMAND_NONE)
return cmd; return cmd;
} }
...@@ -971,7 +971,7 @@ mp3_synth_and_send(struct mp3_data *data, ReplayGainInfo *replay_gain_info) ...@@ -971,7 +971,7 @@ mp3_synth_and_send(struct mp3_data *data, ReplayGainInfo *replay_gain_info)
} }
cmd = mp3_send_pcm(data, i, pcm_length, replay_gain_info); cmd = mp3_send_pcm(data, i, pcm_length, replay_gain_info);
if (cmd == DECODE_COMMAND_STOP) if (cmd != DECODE_COMMAND_NONE)
return cmd; return cmd;
if (data->drop_end_samples && if (data->drop_end_samples &&
......
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