aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/alac.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-07-19 19:47:08 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-07-19 20:14:29 -0400
commit4cd22b77380e6e3411fdfa0cb6c8c2b5def973fc (patch)
tree548ad32bf24a04cdf50b9cff59da052411ac5c12 /libavcodec/alac.c
parenteeb55f5f2f48dba3cb4530e9c65999471affe26e (diff)
downloadffmpeg-4cd22b77380e6e3411fdfa0cb6c8c2b5def973fc.tar.gz
alac: fix channel pointer assignment for 24 and 32-bit
Needs to be done separately for each element.
Diffstat (limited to 'libavcodec/alac.c')
-rw-r--r--libavcodec/alac.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index 310a1f0d5b..aa2e6c8a3c 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -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");
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) {
av_log(avctx, AV_LOG_ERROR, "sample count mismatch: %u != %d\n",
output_samples, alac->nb_samples);
return AVERROR_INVALIDDATA;
}
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) {
int16_t lpc_coefs[2][32];