summaryrefslogtreecommitdiff
path: root/libavcodec/alac.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-21 02:49:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-21 04:25:11 +0200
commit3c033d00f5990e48b14f962d33c362f76695fb07 (patch)
tree261e11fc02302638fd451f9f0d3741fc444cc28c /libavcodec/alac.c
parent85761efa95fd7cfb104fb862a242691d4e7c345c (diff)
parentce64e5bfd11ae63af0fb10317a2aea6f7501be62 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: libopenjpeg: introduce lowres and lowqual private options FATE: add a test for flac cover art. cafdec: allow larger ALAC magic cookie alac: fix channel pointer assignment for 24 and 32-bit Conflicts: libavcodec/alac.c libavcodec/libopenjpegdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 83b2c1b247..f146238327 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -328,16 +328,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->direct_output) {
- 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->direct_output) {
+ 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];