diff options
author | roman.artiukhin <bahusdrive@gmail.com> | 2023-12-22 13:40:54 +0200 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2023-12-31 20:44:15 -0500 |
commit | 4cd65b9d97e5fb172477b31d3dc5bc136cc6950b (patch) | |
tree | 1ea09715a6f15456d762efa22dc40617e20e393d /lib/rbcodec/codecs/libfaad/specrec.c | |
parent | fc65bdab4e9d62fb5edf74284944a204aefd5160 (diff) | |
download | rockbox-4cd65b9d97e5fb172477b31d3dc5bc136cc6950b.tar.gz rockbox-4cd65b9d97e5fb172477b31d3dc5bc136cc6950b.zip |
Codecs: mp4: Disable SBR decoding for PP5002 - PP5022 platforms
Includes ipod video (5G) and earlier models, sansa c200 and others players not capable to decode AAC-HE.
Allows to play backward compatible files as AAC-LC.
Change-Id: Ic9f5c0f255d9a4308c3414d402f8f27f4328ca94
Diffstat (limited to 'lib/rbcodec/codecs/libfaad/specrec.c')
-rw-r--r-- | lib/rbcodec/codecs/libfaad/specrec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/rbcodec/codecs/libfaad/specrec.c b/lib/rbcodec/codecs/libfaad/specrec.c index 200239bddc..02deb298b9 100644 --- a/lib/rbcodec/codecs/libfaad/specrec.c +++ b/lib/rbcodec/codecs/libfaad/specrec.c | |||
@@ -850,9 +850,13 @@ uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics, | |||
850 | #if (defined(PS_DEC) || defined(DRM_PS)) | 850 | #if (defined(PS_DEC) || defined(DRM_PS)) |
851 | if ((hDecoder->ps_used[hDecoder->fr_ch_ele] == 0)) | 851 | if ((hDecoder->ps_used[hDecoder->fr_ch_ele] == 0)) |
852 | { | 852 | { |
853 | uint8_t ele = hDecoder->fr_ch_ele; | ||
854 | uint8_t ch = sce->channel; | 853 | uint8_t ch = sce->channel; |
855 | uint16_t frame_size = (hDecoder->sbr_alloced[ele]) ? 2 : 1; | 854 | uint16_t frame_size = |
855 | #ifdef SBR_DEC | ||
856 | (hDecoder->sbr_alloced[hDecoder->fr_ch_ele]) ? 2 : 1; | ||
857 | #else | ||
858 | 1; | ||
859 | #endif | ||
856 | frame_size *= hDecoder->frameLength*sizeof(real_t); | 860 | frame_size *= hDecoder->frameLength*sizeof(real_t); |
857 | 861 | ||
858 | memcpy(hDecoder->time_out[ch+1], hDecoder->time_out[ch], frame_size); | 862 | memcpy(hDecoder->time_out[ch+1], hDecoder->time_out[ch], frame_size); |