From 26741dcdebe5e8915a40f4c50dd2c4a87e677830 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Sat, 3 Jul 2004 14:13:43 +0000 Subject: 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 --- src/inputPlugins/mp3_plugin.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') 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; -- cgit v1.2.3