Module: libav Branch: master Commit: 41244e13d5452e70cfd42f76ede4a20b7081c71f
Author: Tim Walker <[email protected]> Committer: Anton Khirnov <[email protected]> Date: Tue Jan 22 21:53:53 2013 +0100 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: Anton Khirnov <[email protected]> --- libavcodec/flac_parser.c | 2 +- libavcodec/flacdec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c index 3d8e17f..ee92ee3 100644 --- a/libavcodec/flac_parser.c +++ b/libavcodec/flac_parser.c @@ -458,7 +458,7 @@ static int get_best_header(FLACParseContext* fpc, const uint8_t **poutbuf, } 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; ff_flac_set_channel_layout(fpc->avctx); } diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index 51fd196..f273d14 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -426,7 +426,7 @@ static int decode_frame(FLACContext *s) return ret; } 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); s->ch_mode = fi.ch_mode; _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
