Skip to content

Commit

Permalink
and decoder ...
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe44 committed Apr 5, 2023
1 parent 3372aae commit 1e0fce5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/squeezelite/opus.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ static decode_state opus_decompress(void) {

static void opus_open(u8_t size, u8_t rate, u8_t chan, u8_t endianness) {
if (u->decoder) OP(&gu, decoder_destroy, u->decoder);
u->decoder = NULL;

if (!u->overbuf) u->overbuf = malloc(MAX_OPUS_FRAMES * BYTES_PER_FRAME);

u->status = OGG_SYNC;
Expand All @@ -364,6 +366,7 @@ static void opus_open(u8_t size, u8_t rate, u8_t chan, u8_t endianness) {

static void opus_close(void) {
if (u->decoder) OP(&gu, decoder_destroy, u->decoder);
u->decoder = NULL;

free(u->overbuf);
u->overbuf = NULL;
Expand Down

0 comments on commit 1e0fce5

Please sign in to comment.