diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-07-03 14:13:43 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-07-03 14:13:43 +0000 |
commit | 26741dcdebe5e8915a40f4c50dd2c4a87e677830 (patch) | |
tree | d7b5d150ad2f0ec0c0aef15186879a6d678086b9 | |
parent | 9e246a6ab2d4e7b533a231cf97418c062314a224 (diff) | |
download | mpd-26741dcdebe5e8915a40f4c50dd2c4a87e677830.tar.gz mpd-26741dcdebe5e8915a40f4c50dd2c4a87e677830.tar.xz mpd-26741dcdebe5e8915a40f4c50dd2c4a87e677830.zip |
fix for when trying to seek past the end of an mp3
git-svn-id: https://svn.musicpd.org/mpd/trunk@1782 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r-- | src/inputPlugins/mp3_plugin.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c index 06e674254..108bd7e5f 100644 --- a/src/inputPlugins/mp3_plugin.c +++ b/src/inputPlugins/mp3_plugin.c @@ -706,14 +706,15 @@ int mp3_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream) { data.elapsedTime,data.bitRate/1000); } - flushOutputBuffer(cb); - mp3DecodeDataFinalize(&data); closeInputStream(inStream); - /*if(dc->seek) { - dc->seekError = 1; + if(dc->seek && data.muteFrame == MUTEFRAME_SEEK) { + clearOutputBuffer(cb); dc->seek = 0; - }*/ + } + + flushOutputBuffer(cb); + mp3DecodeDataFinalize(&data); if(dc->stop) { dc->state = DECODE_STATE_STOP; |