mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-07 20:17:04 +03:00
fix opus & vorbis last decode
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
|
||||
struct vorbis {
|
||||
OggVorbis_File *vf;
|
||||
bool opened;
|
||||
bool opened, end;
|
||||
#if FRAME_BUF
|
||||
u8_t *write_buf;
|
||||
#endif
|
||||
@@ -140,7 +140,7 @@ static decode_state vorbis_decode(void) {
|
||||
|
||||
LOCK_S;
|
||||
|
||||
if (stream.state <= DISCONNECT && !_buf_used(streambuf)) {
|
||||
if (stream.state <= DISCONNECT && v->end) {
|
||||
UNLOCK_S;
|
||||
return DECODE_COMPLETE;
|
||||
}
|
||||
@@ -204,6 +204,7 @@ static decode_state vorbis_decode(void) {
|
||||
);
|
||||
|
||||
bytes = frames * 2 * channels; // samples returned are 16 bits
|
||||
v->end = frames == 0;
|
||||
|
||||
// write the decoded frames into outputbuf even though they are 16 bits per sample, then unpack them
|
||||
#ifdef TREMOR_ONLY
|
||||
@@ -324,6 +325,7 @@ static void vorbis_close(void) {
|
||||
v->write_buf = NULL;
|
||||
#endif
|
||||
v->vf = NULL;
|
||||
v->end = false;
|
||||
}
|
||||
|
||||
static bool load_vorbis() {
|
||||
|
||||
Reference in New Issue
Block a user