From 9dd0b7ad821ae1b60acd9ac8f6384c03bd28be51 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer <michaelni@gmx.at> Date: Mon, 11 Mar 2013 17:18:46 +0100 Subject: [PATCH] update_frame_pool: use channel field Fix memory corruption Signed-off-by: Michael Niedermayer <michaelni@gmx.at> --- libavcodec/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index d68c28093bc..9085dfe37da 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -420,7 +420,7 @@ static int update_frame_pool(AVCodecContext *avctx, AVFrame *frame) break; } case AVMEDIA_TYPE_AUDIO: { - int ch = av_get_channel_layout_nb_channels(frame->channel_layout); + int ch = av_frame_get_channels(frame); //av_get_channel_layout_nb_channels(frame->channel_layout); int planar = av_sample_fmt_is_planar(frame->format); int planes = planar ? ch : 1; -- GitLab