Fix seek behavior in Opus, STDIO (#296)

This commit is contained in:
Earle F. Philhower, III authored and GitHub committed 2020-08-12 16:59:03 -07:00
1 parent a0a06a9832
commit 197b7fe794
2 files changed
+2 -3

No files matched your search

+1 -2
View File
@@ -84,7 +84,7 @@ bool AudioGeneratorOpus::loop()
if (ret == OP_HOLE) {
// fprintf(stderr,"\nHole detected! Corrupt file segment?\n");
continue;
} else if (ret < 0) {
} else if (ret <= 0) {
running = false;
goto done;
}
@@ -120,7 +120,6 @@ bool AudioGeneratorOpus::isRunning()
return running;
}
int AudioGeneratorOpus::read_cb(unsigned char *_ptr, int _nbytes) {
if (_nbytes == 0) return 0;
_nbytes = file->read(_ptr, _nbytes);