Browse Source

Fix wrong buffer allocation for MCC in ALS.

Originally committed as revision 21871 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Thilo Borgmann 15 years ago
parent
commit
cd09284924
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/alsdec.c

+ 2
- 2
libavcodec/alsdec.c View File

@@ -1563,7 +1563,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
// allocate and assign channel data buffer for mcc mode
if (sconf->mc_coding) {
ctx->chan_data_buffer = av_malloc(sizeof(*ctx->chan_data_buffer) *
num_buffers);
num_buffers * num_buffers);
ctx->chan_data = av_malloc(sizeof(ALSChannelData) *
num_buffers);
ctx->reverted_channels = av_malloc(sizeof(*ctx->reverted_channels) *
@@ -1576,7 +1576,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
}

for (c = 0; c < num_buffers; c++)
ctx->chan_data[c] = ctx->chan_data_buffer + c;
ctx->chan_data[c] = ctx->chan_data_buffer + c * num_buffers;
} else {
ctx->chan_data = NULL;
ctx->chan_data_buffer = NULL;


Loading…
Cancel
Save