Commit 0813092c authored by Max Kellermann's avatar Max Kellermann

audiofile: refuse to play non-seekable files

If an input_stream is not seekable, libaudiofile fails to play at all: Audio File Library: unrecognized audio file format [error 0] Since we know in advance whether the input_stream is seekable, just refuse to play on a non-seekable stream.
parent 44b55bff
......@@ -113,6 +113,11 @@ audiofile_stream_decode(struct decoder *decoder, struct input_stream *is)
int ret, current = 0;
char chunk[CHUNK_SIZE];
if (!is->seekable) {
g_warning("not seekable");
return;
}
vf = setup_virtual_fops(is);
af_fp = afOpenVirtualFile(vf, "r", NULL);
......
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