aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-19 20:57:25 +0200
committerMax Kellermann <max@duempel.org>2014-08-19 20:57:25 +0200
commit106e5355774a108b0479cca140e877d3da9a9fde (patch)
treeffce29c6eda02b3afae49bff5e240f38eb39e044 /src/decoder
parent194be51f05c991a69032388831c21b7595e3d544 (diff)
downloadmpd-106e5355774a108b0479cca140e877d3da9a9fde.tar.gz
mpd-106e5355774a108b0479cca140e877d3da9a9fde.tar.xz
mpd-106e5355774a108b0479cca140e877d3da9a9fde.zip
decoder/sndfile: check InputStream::KnownSize()
Diffstat (limited to '')
-rw-r--r--src/decoder/plugins/SndfileDecoderPlugin.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/decoder/plugins/SndfileDecoderPlugin.cxx b/src/decoder/plugins/SndfileDecoderPlugin.cxx
index c656302f9..5aad2f16c 100644
--- a/src/decoder/plugins/SndfileDecoderPlugin.cxx
+++ b/src/decoder/plugins/SndfileDecoderPlugin.cxx
@@ -58,6 +58,9 @@ sndfile_vio_get_filelen(void *user_data)
SndfileInputStream &sis = *(SndfileInputStream *)user_data;
const InputStream &is = sis.is;
+ if (!is.KnownSize())
+ return -1;
+
return is.GetSize();
}