Compare commits

...

3 Commits

Author SHA1 Message Date
Philippe G
7bd8c842c8 really triggering a new build - release 2020-12-28 19:17:37 -08:00
Philippe G
fd9158e7c1 no need for aac protection - release
issue was (my bad) in LMS
2020-12-23 16:23:19 -08:00
Philippe G
effd24ccd4 aac was more complicated - best is to ignore last 128 bytes - release 2020-12-23 02:16:29 -08:00
3 changed files with 3 additions and 12 deletions

View File

@@ -182,8 +182,6 @@ CONFIG_BT_A2DP_ENABLE=y
CONFIG_BT_SSP_ENABLED=y
# CONFIG_BT_BLE_ENABLED is not set
CONFIG_BT_STACK_NO_LOG=n
CONFIG_BT_BLE_ENABLED=n
CONFIG_BT_BLE_SMP_ENABLE=y
CONFIG_BT_ACL_CONNECTIONS=4
CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST=y
CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY=y

View File

@@ -431,19 +431,12 @@ static decode_state helixaac_decode(void) {
}
// we always have at least WRAPBUF_LEN unless it's the end of a stream
/* There is a bug in helixaac where it overflows its buffer when not having
* samples and enters an infinite loop so we can't do here the proper test
* if (bytes_wrap < WRAPBUF_LEN && bytes_wrap != bytes_total)
* but instead we'll zero the wrap buf and provide a safe overflow space
* for the decoder
*/
if (bytes_wrap < WRAPBUF_LEN) {
if (bytes_wrap < WRAPBUF_LEN && bytes_wrap != bytes_total) {
// build a linear buffer if we are crossing the end of streambuf
memcpy(a->wrap_buf, streambuf->readp, bytes_wrap);
memcpy(a->wrap_buf + bytes_wrap, streambuf->buf, min(WRAPBUF_LEN, bytes_total) - bytes_wrap);
sptr = a->wrap_buf;
if (bytes_total < WRAPBUF_LEN) memset(a->wrap_buf + bytes_total, 0, WRAPBUF_LEN - bytes_total);
else bytes = bytes_wrap = min(WRAPBUF_LEN, bytes_total);
bytes = bytes_wrap = min(WRAPBUF_LEN, bytes_total);
} else {
sptr = streambuf->readp;
bytes = bytes_wrap;

View File

@@ -334,7 +334,7 @@ static void *stream_thread() {
n = _recv(ssl, fd, streambuf->writep, space, 0);
if (n == 0) {
LOG_INFO("end of stream");
LOG_INFO("end of stream (%u bytes)", stream.bytes);
_disconnect(DISCONNECT, DISCONNECT_OK);
}
if (n < 0 && _last_error() != ERROR_WOULDBLOCK) {