Fix vorbis seeking

Since seeking can return 0 (offset = 0, whence = SEEK_SET), it is
incorrect to return -1 in these cases.

Signed-off-by: mio <stigma@disroot.org>
master
mio 2 months ago
parent 381358f3fc
commit 6e0631b21a

@ -39,10 +39,7 @@ static size_t _read(void *ptr, size_t size, size_t nmemb, void *datasource) {
static int _seek(void *datasource, ogg_int64_t offset, int whence) {
File *src = (File*)datasource;
if (src->lseek(offset, whence))
return 0;
else
return -1;
return src->lseek(offset, whence);
}
static int _close(void *datasource) {

Loading…
Cancel
Save