Commit 9dd0b7ad authored by Michael Niedermayer's avatar Michael Niedermayer

update_frame_pool: use channel field

Fix memory corruption
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 80e9e63c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment