Commit 194be51f authored by Max Kellermann's avatar Max Kellermann

decoder/pcm: check InputStream::KnownSize()

parent a862e363
......@@ -43,9 +43,8 @@ pcm_stream_decode(Decoder &decoder, InputStream &is)
const double time_to_size = audio_format.GetTimeToSize();
float total_time = -1;
const auto size = is.GetSize();
if (size >= 0)
total_time = size / time_to_size;
if (is.KnownSize())
total_time = is.GetSize() / time_to_size;
decoder_initialized(decoder, audio_format,
is.IsSeekable(), total_time);
......
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