mpd: Upgrade Music Player Daemon to 0.20.8
[feed/packages.git] / sound / mpd / patches / 220-handle_slow_server_stream_startup.patch
1 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx
2 +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx
3 @@ -478,6 +478,13 @@ ffmpeg_probe(DecoderClient *client, Inpu
4
5 unsigned char buffer[BUFFER_SIZE];
6 size_t nbytes = decoder_read(client, is, buffer, BUFFER_SIZE);
7 +
8 + if ((nbytes > 0) && (nbytes < 1024))
9 + {
10 + // Gobble some more data if header is small
11 + nbytes += decoder_read(client, is, buffer + nbytes, BUFFER_SIZE - nbytes);
12 + }
13 +
14 if (nbytes <= PADDING)
15 return nullptr;
16