Fix crashes on unseekable or pure empty vorbis files

This commit is contained in:
Ralty
2025-08-06 04:54:25 +07:00
parent 549c1ad441
commit 16b080bf84
2 changed files with 19 additions and 2 deletions
@@ -372,7 +372,7 @@ class NativeAudioSource {
if (playing) {
var timeRemaining = (getLength() - value) / getPitch();
if (timeRemaining < 8) complete();
if (timeRemaining < 8 && value > 8) complete();
else {
completed = streamEnded = false;
if (streamed) {