[FFmpeg-cvslog] flac: don't check the number of channels before setting the channel layout

Tim Walker git at videolan.org
Thu Feb 7 10:39:49 CET 2013


ffmpeg | branch: master | Tim Walker <tdskywalker at gmail.com> | Thu Feb  7 09:36:21 2013 +0000| [08797c599df5371909f6924d732b654f8892cc91] | committer: Paul B Mahol

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=08797c599df5371909f6924d732b654f8892cc91
---

 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 52ec1ee..e2c6744 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 0e887e6..5624972 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -424,7 +424,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;
 



More information about the ffmpeg-cvslog mailing list