diff options
author | Max Kellermann <max@duempel.org> | 2014-08-19 20:57:25 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-19 20:57:25 +0200 |
commit | 106e5355774a108b0479cca140e877d3da9a9fde (patch) | |
tree | ffce29c6eda02b3afae49bff5e240f38eb39e044 /src | |
parent | 194be51f05c991a69032388831c21b7595e3d544 (diff) | |
download | mpd-106e5355774a108b0479cca140e877d3da9a9fde.tar.gz mpd-106e5355774a108b0479cca140e877d3da9a9fde.tar.xz mpd-106e5355774a108b0479cca140e877d3da9a9fde.zip |
decoder/sndfile: check InputStream::KnownSize()
Diffstat (limited to 'src')
-rw-r--r-- | src/decoder/plugins/SndfileDecoderPlugin.cxx | 3 |
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(); } |