Commit b924568f authored by Max Kellermann's avatar Max Kellermann

decoder/audiofile: check InputStream::KnownSize()

The plugin assumes that the size is known, but does not verify it at runtime.
parent e6e9c212
......@@ -184,7 +184,7 @@ audiofile_setup_sample_format(AFfilehandle af_fp)
static void
audiofile_stream_decode(Decoder &decoder, InputStream &is)
{
if (!is.IsSeekable()) {
if (!is.IsSeekable() || !is.KnownSize()) {
LogWarning(audiofile_domain, "not seekable");
return;
}
......@@ -250,7 +250,7 @@ gcc_pure
static int
audiofile_get_duration(InputStream &is)
{
if (!is.IsSeekable())
if (!is.IsSeekable() || !is.KnownSize())
return -1;
AudioFileInputStream afis{nullptr, is};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment