OSDN Git Service

flac: don't check the number of channels before setting the channel layout.
authorTim Walker <tdskywalker@gmail.com>
Tue, 22 Jan 2013 20:53:53 +0000 (21:53 +0100)
committerAnton Khirnov <anton@khirnov.net>
Wed, 6 Feb 2013 20:43:05 +0000 (21:43 +0100)
This is unnecessary, as ff_flac_set_channel_layout can handle any number of channels.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/flac_parser.c
libavcodec/flacdec.c

index 3d8e17f..ee92ee3 100644 (file)
@@ -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);
     }
index 51fd196..f273d14 100644 (file)
@@ -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;