Commit 4fe965c3 authored by J. Alexander Treuman's avatar J. Alexander Treuman

Stop decoding once we've dropped samples at the end (it messes up the audio if…

Stop decoding once we've dropped samples at the end (it messes up the audio if there's more mp3 to decode) git-svn-id: https://svn.musicpd.org/mpd/trunk@4619 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent 66512edb
...@@ -822,7 +822,9 @@ static int mp3Read(mp3DecodeData * data, OutputBuffer * cb, DecoderControl * dc, ...@@ -822,7 +822,9 @@ static int mp3Read(mp3DecodeData * data, OutputBuffer * cb, DecoderControl * dc,
} else if (data->dropSamplesAtEnd && } else if (data->dropSamplesAtEnd &&
(data->currentFrame == (data->maxFrames - data->dropFramesAtEnd))) { (data->currentFrame == (data->maxFrames - data->dropFramesAtEnd))) {
samplesLeft--; samplesLeft--;
if (samplesLeft < data->dropSamplesAtEnd) break; /* stop decoding, since samples were dropped */
if (samplesLeft < data->dropSamplesAtEnd)
return DECODE_BREAK;
} }
sample = (mpd_sint16 *) data->outputPtr; sample = (mpd_sint16 *) data->outputPtr;
......
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