Commit 5352802d authored by Luca Barbato's avatar Luca Barbato Committed by Sean McGovern

dca: Account for lfe when checking for the channel count

Bug-Id: 1037
CC: libav-stable@libav.org
parent 37f57354
...@@ -1300,7 +1300,7 @@ static int set_channel_layout(AVCodecContext *avctx, int channels) ...@@ -1300,7 +1300,7 @@ static int set_channel_layout(AVCodecContext *avctx, int channels)
s->channel_order_tab = ff_dca_channel_reorder_nolfe[s->amode]; 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; return AVERROR_INVALIDDATA;
if (channels > !!s->lfe && if (channels > !!s->lfe &&
......
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