fix vorbis and ogg ending early - release

This commit is contained in:
philippe44
2023-06-03 00:43:22 +02:00
parent 71c696ccd7
commit 8b764c0c2d
3 changed files with 4 additions and 6 deletions

View File

@@ -152,9 +152,9 @@ static int get_opus_packet(void) {
if (status) OG(&go, stream_pagein, &u->state, &u->page);
}
// only return a negative value when end of streaming is reached
// only return a negative value when true end of streaming is reached
if (status > 0) packet = status;
else if (stream.state > DISCONNECT) packet = 0;
else if (stream.state > DISCONNECT || _buf_used(streambuf)) packet = 0;
UNLOCK_S;
return packet;