mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-10 05:27:01 +03:00
aac channels wrong calculation - release
This commit is contained in:
@@ -156,7 +156,7 @@ static int read_mp4_header(unsigned long *samplerate_p, unsigned char *channels_
|
|||||||
info.sampRateCore = (*ptr++ & 0x07) << 1;
|
info.sampRateCore = (*ptr++ & 0x07) << 1;
|
||||||
info.sampRateCore |= (*ptr >> 7) & 0x01;
|
info.sampRateCore |= (*ptr >> 7) & 0x01;
|
||||||
info.sampRateCore = rates[info.sampRateCore];
|
info.sampRateCore = rates[info.sampRateCore];
|
||||||
info.nChans = *ptr >> 3;
|
info.nChans = (*ptr & 0x7f) >> 3;
|
||||||
*channels_p = info.nChans;
|
*channels_p = info.nChans;
|
||||||
*samplerate_p = info.sampRateCore;
|
*samplerate_p = info.sampRateCore;
|
||||||
HAAC(a, SetRawBlockParams, a->hAac, 0, &info);
|
HAAC(a, SetRawBlockParams, a->hAac, 0, &info);
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ static decode_state pcm_decode(void) {
|
|||||||
out = process.max_in_frames;
|
out = process.max_in_frames;
|
||||||
);
|
);
|
||||||
|
|
||||||
if ((stream.state <= DISCONNECT && bytes == 0) || (limit && audio_left == 0)) {
|
if ((stream.state <= DISCONNECT && bytes < bytes_per_frame) || (limit && audio_left == 0)) {
|
||||||
UNLOCK_O_direct;
|
UNLOCK_O_direct;
|
||||||
UNLOCK_S;
|
UNLOCK_S;
|
||||||
return DECODE_COMPLETE;
|
return DECODE_COMPLETE;
|
||||||
|
|||||||
Reference in New Issue
Block a user