aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2006-08-13 02:56:23 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2006-08-13 02:56:23 +0000
commit4fe965c3044888bafa6c86e40724c20faa16f972 (patch)
tree13dcd77422fdbb758b25f7a956348b286502d189 /src
parent66512edb6caaffa78727bfd43b0dbe540d06ce21 (diff)
downloadmpd-4fe965c3044888bafa6c86e40724c20faa16f972.tar.gz
mpd-4fe965c3044888bafa6c86e40724c20faa16f972.tar.xz
mpd-4fe965c3044888bafa6c86e40724c20faa16f972.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/inputPlugins/mp3_plugin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c
index 6211ce085..f2329d25a 100644
--- a/src/inputPlugins/mp3_plugin.c
+++ b/src/inputPlugins/mp3_plugin.c
@@ -822,7 +822,9 @@ static int mp3Read(mp3DecodeData * data, OutputBuffer * cb, DecoderControl * dc,
} else if (data->dropSamplesAtEnd &&
(data->currentFrame == (data->maxFrames - data->dropFramesAtEnd))) {
samplesLeft--;
- if (samplesLeft < data->dropSamplesAtEnd) break;
+ /* stop decoding, since samples were dropped */
+ if (samplesLeft < data->dropSamplesAtEnd)
+ return DECODE_BREAK;
}
sample = (mpd_sint16 *) data->outputPtr;