From 4da3291157ce38b0baa41c16782be94da6ec2b0a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 19 Aug 2014 20:29:38 +0200 Subject: [PATCH] decoder/ffmpeg: check InputStream::KnownSize() --- src/decoder/plugins/FfmpegDecoderPlugin.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx index 097ec919f..40dd627b5 100644 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx @@ -135,6 +135,9 @@ mpd_ffmpeg_stream_seek(void *opaque, int64_t pos, int whence) break; case AVSEEK_SIZE: + if (!stream->input.KnownSize()) + return -1; + return stream->input.GetSize(); default: