1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

alacdec: cosmetics: use 'ch' instead of 'chan' to iterate channels

This commit is contained in:
Justin Ruggles 2011-10-09 14:21:35 -04:00
parent 01200f1283
commit 63cf54df7a

View File

@ -534,11 +534,11 @@ static av_cold int alac_decode_close(AVCodecContext *avctx)
{ {
ALACContext *alac = avctx->priv_data; ALACContext *alac = avctx->priv_data;
int chan; int ch;
for (chan = 0; chan < alac->numchannels; chan++) { for (ch = 0; ch < alac->numchannels; ch++) {
av_freep(&alac->predicterror_buffer[chan]); av_freep(&alac->predicterror_buffer[ch]);
av_freep(&alac->outputsamples_buffer[chan]); av_freep(&alac->outputsamples_buffer[ch]);
av_freep(&alac->extra_bits_buffer[chan]); av_freep(&alac->extra_bits_buffer[ch]);
} }
return 0; return 0;
@ -546,19 +546,19 @@ static av_cold int alac_decode_close(AVCodecContext *avctx)
static int allocate_buffers(ALACContext *alac) static int allocate_buffers(ALACContext *alac)
{ {
int chan; int ch;
for (chan = 0; chan < alac->numchannels; chan++) { for (ch = 0; ch < alac->numchannels; ch++) {
alac->predicterror_buffer[chan] = alac->predicterror_buffer[ch] =
av_malloc(alac->setinfo_max_samples_per_frame * 4); av_malloc(alac->setinfo_max_samples_per_frame * 4);
alac->outputsamples_buffer[chan] = alac->outputsamples_buffer[ch] =
av_malloc(alac->setinfo_max_samples_per_frame * 4); av_malloc(alac->setinfo_max_samples_per_frame * 4);
alac->extra_bits_buffer[chan] = av_malloc(alac->setinfo_max_samples_per_frame * 4); alac->extra_bits_buffer[ch] = av_malloc(alac->setinfo_max_samples_per_frame * 4);
if (!alac->predicterror_buffer[chan] || if (!alac->predicterror_buffer[ch] ||
!alac->outputsamples_buffer[chan] || !alac->outputsamples_buffer[ch] ||
!alac->extra_bits_buffer[chan]) { !alac->extra_bits_buffer[ch]) {
alac_decode_close(alac->avctx); alac_decode_close(alac->avctx);
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }