Open a1batross opened 2 hours ago
opus_custom_encode calls celt_encode_with_ec with NULL passed as ec_enc *enc parameter.
opus_custom_encode
celt_encode_with_ec
ec_enc *enc
In this function, ec_enc_shrink is called at https://github.com/xiph/opus/blob/main/celt/celt_encoder.c#L1596. enc variable gets initialized in branch below at https://github.com/xiph/opus/blob/main/celt/celt_encoder.c#L1607.
ec_enc_shrink
enc
Unlike other branches that check for enc being NULL pointer, here it's omitted, causing a crash when st->bitrate isn't OPUS_BITRATE_MAX.
st->bitrate
OPUS_BITRATE_MAX
It seems it was broken here: https://github.com/xiph/opus/commit/9fdc489c359b8723902a8e440d6efa89ba929862
opus_custom_encode
callscelt_encode_with_ec
with NULL passed asec_enc *enc
parameter.In this function,
ec_enc_shrink
is called at https://github.com/xiph/opus/blob/main/celt/celt_encoder.c#L1596.enc
variable gets initialized in branch below at https://github.com/xiph/opus/blob/main/celt/celt_encoder.c#L1607.Unlike other branches that check for
enc
being NULL pointer, here it's omitted, causing a crash whenst->bitrate
isn'tOPUS_BITRATE_MAX
.