Commit 5327a8f4 authored by Warren Dukes's avatar Warren Dukes

when filling mp3 buffer, check if its already full. If it is, then give up…

when filling mp3 buffer, check if its already full. If it is, then give up trying to read in a potential mp3 frame, cause no mp3 frame should be bigger than the input buffer git-svn-id: https://svn.musicpd.org/mpd/trunk@2950 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent 9e4465cb
......@@ -187,6 +187,10 @@ int fillMp3InputBuffer(mp3DecodeData * data) {
remaining = 0;
}
/* we've exhausted the read buffer, so give up!, these potential
* mp3 frames are way too big, and thus unlikely to be mp3 frames */
if(readSize == 0) return -1;
readed = readFromInputStream(data->inStream, readStart, (size_t)1,
readSize);
if(readed <= 0 && inputStreamAtEOF(data->inStream)) return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment