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>
(cherry picked from commit 6e0631b21a)
r14.1.x r14.1.4
mio 1 year ago
parent bca4857751
commit 63eb831696

@ -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