mpd: Upgrade Music Player Daemon to 0.20.8

Signed-off-by: Ted Hess <thess@kitschensync.net>
This commit is contained in:
Ted Hess
2017-05-20 11:30:38 -04:00
parent 3b8681fc66
commit 50d84f13a2
3 changed files with 14 additions and 16 deletions
@@ -1,6 +1,6 @@
--- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx
+++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx
@@ -777,6 +777,7 @@ static const char *const ffmpeg_mime_typ
@@ -930,6 +930,7 @@ static const char *const ffmpeg_mime_typ
"audio/qcelp",
"audio/vorbis",
"audio/vorbis+ogg",
@@ -1,16 +1,16 @@
--- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx
+++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx
@@ -465,6 +465,13 @@ ffmpeg_probe(Decoder *decoder, InputStre
@@ -478,6 +478,13 @@ ffmpeg_probe(DecoderClient *client, Inpu
unsigned char buffer[BUFFER_SIZE];
size_t nbytes = decoder_read(decoder, is, buffer, BUFFER_SIZE);
size_t nbytes = decoder_read(client, is, buffer, BUFFER_SIZE);
+
+ if ((nbytes > 0) && (nbytes < 1024))
+ {
+ // Gobble some more data if header is small
+ nbytes += decoder_read(decoder, is, buffer + nbytes, BUFFER_SIZE - nbytes);
+ nbytes += decoder_read(client, is, buffer + nbytes, BUFFER_SIZE - nbytes);
+ }
+
if (nbytes <= PADDING || !is.LockRewind(IgnoreError()))
if (nbytes <= PADDING)
return nullptr;