[FFmpeg-cvslog] r21871 - trunk/libavcodec/alsdec.c
thilo.borgmann
subversion
Wed Feb 17 23:53:25 CET 2010
Author: thilo.borgmann
Date: Wed Feb 17 23:53:25 2010
New Revision: 21871
Log:
Fix wrong buffer allocation for MCC in ALS.
Modified:
trunk/libavcodec/alsdec.c
Modified: trunk/libavcodec/alsdec.c
==============================================================================
--- trunk/libavcodec/alsdec.c Wed Feb 17 22:37:35 2010 (r21870)
+++ trunk/libavcodec/alsdec.c Wed Feb 17 23:53:25 2010 (r21871)
@@ -1563,7 +1563,7 @@ static av_cold int decode_init(AVCodecCo
// 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(AVCodecCo
}
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;
More information about the ffmpeg-cvslog
mailing list