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.
This commit is contained in:
parent
44b55bff89
commit
0813092c63
|
@ -113,6 +113,11 @@ audiofile_stream_decode(struct decoder *decoder, struct input_stream *is)
|
||||||
int ret, current = 0;
|
int ret, current = 0;
|
||||||
char chunk[CHUNK_SIZE];
|
char chunk[CHUNK_SIZE];
|
||||||
|
|
||||||
|
if (!is->seekable) {
|
||||||
|
g_warning("not seekable");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
vf = setup_virtual_fops(is);
|
vf = setup_virtual_fops(is);
|
||||||
|
|
||||||
af_fp = afOpenVirtualFile(vf, "r", NULL);
|
af_fp = afOpenVirtualFile(vf, "r", NULL);
|
||||||
|
|
Loading…
Reference in New Issue