Commit 41244e13 authored by Tim Walker's avatar Tim Walker Committed by Anton Khirnov

flac: don't check the number of channels before setting the channel layout.

This is unnecessary, as ff_flac_set_channel_layout can handle any number of channels.
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent a846dccb
...@@ -458,7 +458,7 @@ static int get_best_header(FLACParseContext* fpc, const uint8_t **poutbuf, ...@@ -458,7 +458,7 @@ static int get_best_header(FLACParseContext* fpc, const uint8_t **poutbuf,
} }
if (header->fi.channels != fpc->avctx->channels || if (header->fi.channels != fpc->avctx->channels ||
(!fpc->avctx->channel_layout && header->fi.channels <= 6)) { !fpc->avctx->channel_layout) {
fpc->avctx->channels = header->fi.channels; fpc->avctx->channels = header->fi.channels;
ff_flac_set_channel_layout(fpc->avctx); ff_flac_set_channel_layout(fpc->avctx);
} }
......
...@@ -426,7 +426,7 @@ static int decode_frame(FLACContext *s) ...@@ -426,7 +426,7 @@ static int decode_frame(FLACContext *s)
return ret; return ret;
} }
s->channels = s->avctx->channels = fi.channels; s->channels = s->avctx->channels = fi.channels;
if (!s->avctx->channel_layout && s->channels <= 6) if (!s->avctx->channel_layout)
ff_flac_set_channel_layout(s->avctx); ff_flac_set_channel_layout(s->avctx);
s->ch_mode = fi.ch_mode; s->ch_mode = fi.ch_mode;
......
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