ref: 10a8990bf2b0c7e22e186876f7622204bad14ed2
parent: 8b2ec5760776ef44ca772c3f25a46cc417bfb217
author: Jean-Marc Valin <jeanmarcv@google.com>
date: Fri Sep 12 10:22:26 EDT 2025
Fix LBRR detection for ToC-only single-byte packet Thanks to Jakob Ivarsson
--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -1264,6 +1264,8 @@
ret = opus_packet_parse(packet, len, NULL, frames, size, NULL);
if (ret <= 0)
return ret;
+ if (size[0] == 0)
+ return 0;
lbrr = (frames[0][0] >> (7-nb_frames)) & 0x1;
if (packet_stream_channels == 2)
lbrr = lbrr || ((frames[0][0] >> (6-2*nb_frames)) & 0x1);
--
⑨