aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/mp3_plugin.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-06-03 02:56:26 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-06-03 02:56:26 +0000
commit15c61f6eb06b43097678682f7022d55f4aed9ce0 (patch)
tree27bf0fc4c1d207a501c7ad64b710b2c8dcc15938 /src/inputPlugins/mp3_plugin.c
parenta29e38bef536c6f824d23fffe2e18c43ac01b5c4 (diff)
downloadmpd-15c61f6eb06b43097678682f7022d55f4aed9ce0.tar.gz
mpd-15c61f6eb06b43097678682f7022d55f4aed9ce0.tar.xz
mpd-15c61f6eb06b43097678682f7022d55f4aed9ce0.zip
don't stop on play command!
git-svn-id: https://svn.musicpd.org/mpd/trunk@1313 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/inputPlugins/mp3_plugin.c')
-rw-r--r--src/inputPlugins/mp3_plugin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c
index 3ba1d36a0..a501377dc 100644
--- a/src/inputPlugins/mp3_plugin.c
+++ b/src/inputPlugins/mp3_plugin.c
@@ -451,7 +451,6 @@ void mp3DecodeDataFinalize(mp3DecodeData * data) {
mad_frame_finish(&data->frame);
mad_stream_finish(&data->stream);
- closeInputStream(data->inStream);
if(data->frameOffset) free(data->frameOffset);
if(data->times) free(data->times);
}
@@ -468,6 +467,7 @@ int getMp3TotalTime(char * file) {
if(decodeFirstFrame(&data, NULL, NULL)<0) ret = -1;
else ret = data.totalTime+0.5;
mp3DecodeDataFinalize(&data);
+ closeInputStream(&inStream);
return ret;
}
@@ -626,7 +626,7 @@ int mp3_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream) {
MpdTag * tag;
if(openMp3FromInputStream(inStream, &data, dc, &tag) < 0) {
- closeInputStream(inStream);
+ closeInputStream(inStream);
if(!dc->stop) {
ERROR("Input does not appear to be a mp3 bit stream.\n");
return -1;
@@ -662,6 +662,7 @@ int mp3_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream) {
flushOutputBuffer(cb);
mp3DecodeDataFinalize(&data);
+ closeInputStream(inStream);
/*if(dc->seek) {
dc->seekError = 1;