summaryrefslogtreecommitdiff
path: root/lib/rbcodec/metadata
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/metadata')
-rw-r--r--lib/rbcodec/metadata/aac.c2
-rw-r--r--lib/rbcodec/metadata/mp4.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/rbcodec/metadata/aac.c b/lib/rbcodec/metadata/aac.c
index 358b2de079..372bab716e 100644
--- a/lib/rbcodec/metadata/aac.c
+++ b/lib/rbcodec/metadata/aac.c
@@ -93,11 +93,13 @@ bool get_aac_metadata(int fd, struct mp3entry *entry)
93 break; 93 break;
94 } 94 }
95 entry->bitrate = (unsigned int)((total * entry->frequency / frames + 64000) / 128000); 95 entry->bitrate = (unsigned int)((total * entry->frequency / frames + 64000) / 128000);
96#ifdef CODEC_AAC_SBR_DEC
96 if (entry->frequency <= 24000) 97 if (entry->frequency <= 24000)
97 { 98 {
98 entry->frequency <<= 1; 99 entry->frequency <<= 1;
99 entry->needs_upsampling_correction = true; 100 entry->needs_upsampling_correction = true;
100 } 101 }
102#endif
101 } 103 }
102 else 104 else
103 { 105 {
diff --git a/lib/rbcodec/metadata/mp4.c b/lib/rbcodec/metadata/mp4.c
index e05a588e7e..706a50e503 100644
--- a/lib/rbcodec/metadata/mp4.c
+++ b/lib/rbcodec/metadata/mp4.c
@@ -349,7 +349,10 @@ static bool read_mp4_esds(int fd, struct mp3entry* id3, uint32_t* size)
349 } 349 }
350 } 350 }
351 } 351 }
352 352#ifndef CODEC_AAC_SBR_DEC
353 //SBR_DEC is disabled so disable sbr implicit signalling
354 sbr_signaled = true;
355#endif
353 if (!sbr && !sbr_signaled && id3->frequency <= 24000) 356 if (!sbr && !sbr_signaled && id3->frequency <= 24000)
354 { 357 {
355 /* As stated in libfaad/mp4.c AudioSpecificConfig2: 358 /* As stated in libfaad/mp4.c AudioSpecificConfig2: