From 106e5355774a108b0479cca140e877d3da9a9fde Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 19 Aug 2014 20:57:25 +0200 Subject: decoder/sndfile: check InputStream::KnownSize() --- src/decoder/plugins/SndfileDecoderPlugin.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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(); } -- cgit v1.2.3