[FFmpeg-devel] [PATCH] SIPR: kill variable-length arrays
Yuriy Kaminskiy
yumkam
Tue Jan 12 22:37:18 CET 2010
On 12.01.2010 23:35, Mans Rullgard wrote:
> Two of these are in fact constant size, so use the constant instead of
> a variable in the declarations. The remaining one is small enough
> that always using the maximum size is acceptable.
> diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c
> index 7bfa3ab..7110c0f 100644
> @@ -409,7 +411,7 @@ static void decode_frame(SiprContext *ctx, SiprParameters *params,
> {
> int i, j;
> int frame_size = ctx->m.subframe_count * SUBFR_SIZE;
> - float Az[LP_FILTER_ORDER * ctx->m.subframe_count];
> + float Az[LP_FILTER_ORDER * MAX_SUBFRAME_COUNT * SUBFR_SIZE];
s/\* SUBFR_SIZE// ? it was .subframe_count before, not frame_size
More information about the ffmpeg-devel
mailing list