diff --git a/src/contrib/mpg123decoder/MP3Decoder.cpp b/src/contrib/mpg123decoder/MP3Decoder.cpp index a86fa62b0..d75a21f1a 100644 --- a/src/contrib/mpg123decoder/MP3Decoder.cpp +++ b/src/contrib/mpg123decoder/MP3Decoder.cpp @@ -216,10 +216,10 @@ bool MP3Decoder::Open(musik::core::filestreams::IFileStream *fileStream){ bool continueFeed(true); // Loop until we have a format - int maxLoops(256); // + int maxLoops(0); // while(continueFeed){ - continueFeed = continueFeed && this->Feed() && maxLoops>0; - --maxLoops; + continueFeed = continueFeed && this->Feed() && !this->fileStream->Eof(); + ++maxLoops; if(continueFeed){ if(mpg123_getformat(this->decoder,&this->cachedRate,&this->cachedChannels,&encoding)==MPG123_OK){ continueFeed = (this->cachedRate==0);