alac: fix channel pointer assignment for 24 and 32-bit
Needs to be done separately for each element.
This commit is contained in:
parent
eeb55f5f2f
commit
4cd22b7738
@ -322,16 +322,16 @@ static int decode_element(AVCodecContext *avctx, void *data, int ch_index,
|
|||||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
if (alac->sample_size > 16) {
|
|
||||||
for (ch = 0; ch < channels; ch++)
|
|
||||||
alac->output_samples_buffer[ch] = (int32_t *)alac->frame.extended_data[ch_index + ch];
|
|
||||||
}
|
|
||||||
} else if (output_samples != alac->nb_samples) {
|
} else if (output_samples != alac->nb_samples) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "sample count mismatch: %u != %d\n",
|
av_log(avctx, AV_LOG_ERROR, "sample count mismatch: %u != %d\n",
|
||||||
output_samples, alac->nb_samples);
|
output_samples, alac->nb_samples);
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
alac->nb_samples = output_samples;
|
alac->nb_samples = output_samples;
|
||||||
|
if (alac->sample_size > 16) {
|
||||||
|
for (ch = 0; ch < channels; ch++)
|
||||||
|
alac->output_samples_buffer[ch] = (int32_t *)alac->frame.extended_data[ch_index + ch];
|
||||||
|
}
|
||||||
|
|
||||||
if (is_compressed) {
|
if (is_compressed) {
|
||||||
int16_t lpc_coefs[2][32];
|
int16_t lpc_coefs[2][32];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user