From 0f88c930980c8aa8ec3a6cfaa1639eb1fd193bcc Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Tue, 19 Sep 2017 12:18:16 +0200 Subject: [PATCH] Revert an broke fix in the audio decoder. --- MP42/MP42AudioDecoder.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MP42/MP42AudioDecoder.m b/MP42/MP42AudioDecoder.m index 628326c..a75d7f7 100644 --- a/MP42/MP42AudioDecoder.m +++ b/MP42/MP42AudioDecoder.m @@ -354,9 +354,10 @@ static void configureDescriptors(MP42DecodeContext *context, AVFrame *frame) context->inputFormat->mSampleRate = sample_rate; if (sample_rate > 48000) { - context->outputFormat->mSampleRate = sample_rate; + sample_rate = 48000; } + context->outputFormat->mSampleRate = sample_rate; context->outputFormat->mBytesPerPacket = 4 * context->outputFormat->mChannelsPerFrame; context->outputFormat->mBytesPerFrame = context->outputFormat->mBytesPerPacket * context->outputFormat->mFramesPerPacket;