diff options
author | Max Kellermann <max@duempel.org> | 2014-08-19 20:29:38 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-19 20:44:29 +0200 |
commit | 4da3291157ce38b0baa41c16782be94da6ec2b0a (patch) | |
tree | a852eb224366c842d583bdcf7e09ad20b4e1419a | |
parent | 52edabf2cbcea64de4e176d9f5de916f572e97c0 (diff) | |
download | mpd-4da3291157ce38b0baa41c16782be94da6ec2b0a.tar.gz mpd-4da3291157ce38b0baa41c16782be94da6ec2b0a.tar.xz mpd-4da3291157ce38b0baa41c16782be94da6ec2b0a.zip |
decoder/ffmpeg: check InputStream::KnownSize()
Diffstat (limited to '')
-rw-r--r-- | src/decoder/plugins/FfmpegDecoderPlugin.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
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: |