Commit 17352ad3 authored by Michael Niedermayer's avatar Michael Niedermayer

alacdec: fix packed sample output with 5.1

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 3800faca
......@@ -440,23 +440,29 @@ static int decode_element(AVCodecContext *avctx, void *data, int ch_index,
switch(alac->sample_size) {
case 16: {
int16_t *outbuffer = ((int16_t *)alac->frame.extended_data[0]) + ch_index;
for (i = 0; i < alac->nb_samples; i++)
for (i = 0; i < alac->nb_samples; i++) {
for (ch = 0; ch < channels; ch++)
*outbuffer++ = alac->output_samples_buffer[ch][i];
outbuffer += alac->channels - channels;
}
}
break;
case 24: {
int32_t *outbuffer = ((int32_t *)alac->frame.extended_data[0]) + ch_index;
for (i = 0; i < alac->nb_samples; i++)
for (i = 0; i < alac->nb_samples; i++) {
for (ch = 0; ch < channels; ch++)
*outbuffer++ = alac->output_samples_buffer[ch][i] << 8;
outbuffer += alac->channels - channels;
}
}
break;
case 32: {
int32_t *outbuffer = ((int32_t *)alac->frame.extended_data[0]) + ch_index;
for (i = 0; i < alac->nb_samples; i++)
for (i = 0; i < alac->nb_samples; i++) {
for (ch = 0; ch < channels; ch++)
*outbuffer++ = alac->output_samples_buffer[ch][i];
outbuffer += alac->channels - channels;
}
}
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment