From 999ee28124f3b636bfab7cc6cb77b13224e07583 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 10 Dec 2013 00:33:15 +0100 Subject: [PATCH] avcodec/utils: dont depend on the channel layout in unrefcount_frame() Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index eeefcf24cf..ee873d7f04 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2047,7 +2047,7 @@ static int unrefcount_frame(AVCodecInternal *avci, AVFrame *frame) memcpy(frame->data, avci->to_free->data, sizeof(frame->data)); memcpy(frame->linesize, avci->to_free->linesize, sizeof(frame->linesize)); if (avci->to_free->extended_data != avci->to_free->data) { - int planes = av_get_channel_layout_nb_channels(avci->to_free->channel_layout); + int planes = av_frame_get_channels(avci->to_free); int size = planes * sizeof(*frame->extended_data); if (!size) {