Fix some channel layouts.

This commit is contained in:
Damiano Galassi committed 2016-07-26 14:45:36 +02:00
1 parent ffe8abd0b6
commit 982b36daf0
2 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -257,10 +257,10 @@ static int initResampler(MP42DecodeContext *context, AVFrame *frame)
layout = frame->channel_layout;
}
UInt32 layout_size = sizeof(AudioChannelLayout) +
sizeof(AudioChannelDescription) * nb_channels;
sizeof(AudioChannelDescription) * context->outputFormat->mChannelsPerFrame;
AudioChannelLayout *outputLayout = malloc(layout_size);
bzero(outputLayout, layout_size);
remap_layout(outputLayout, frame->channel_layout, nb_channels);
remap_layout(outputLayout, layout, context->outputFormat->mChannelsPerFrame);
*context->outputLayoutSize = layout_size;
*context->outputLayout = outputLayout;