dca: Account for lfe when checking for the channel count

Bug-Id: 1037
CC: libav-stable@libav.org
This commit is contained in:
Luca Barbato 2017-04-17 12:53:14 +00:00 committed by Sean McGovern
parent 37f573543c
commit 5352802da8
1 changed files with 1 additions and 1 deletions

View File

@ -1300,7 +1300,7 @@ static int set_channel_layout(AVCodecContext *avctx, int channels)
s->channel_order_tab = ff_dca_channel_reorder_nolfe[s->amode];
}
if (channels < ff_dca_channels[s->amode])
if (channels < ff_dca_channels[s->amode] + !!s->lfe)
return AVERROR_INVALIDDATA;
if (channels > !!s->lfe &&