Skip to content

Commit 6dfd251

Browse files
committed
mp4v2: Fix that sampling rate of HE-AAC is shown in half (Fix #2)
I'm not sure whether this is a correct fix, though.
1 parent f3bcceb commit 6dfd251

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/lib/mp4v2/src/mp4.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2331,7 +2331,11 @@ MP4FileHandle MP4ReadProvider( const char* fileName, const MP4FileProvider* file
23312331
{
23322332
if (MP4_IS_VALID_FILE_HANDLE(hFile)) {
23332333
try {
2334-
return ((MP4File*)hFile)->GetTrackTimeScale(trackId);
2334+
uint32_t timeScale = ((MP4File*)hFile)->GetTrackTimeScale(trackId);
2335+
if (MP4GetTrackAudioMpeg4Type(hFile, trackId) == MP4_MPEG4_AAC_HE_AUDIO_TYPE) {
2336+
timeScale *= 2;
2337+
}
2338+
return timeScale;
23352339
}
23362340
catch( Exception* x ) {
23372341
mp4v2::impl::log.errorf(*x);

0 commit comments

Comments
 (0)