Browse Source

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 <anton@khirnov.net>
tags/n1.2
Tim Walker Anton Khirnov 12 years ago
parent
commit
41244e13d5
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      libavcodec/flac_parser.c
  2. +1
    -1
      libavcodec/flacdec.c

+ 1
- 1
libavcodec/flac_parser.c View 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);
}


+ 1
- 1
libavcodec/flacdec.c View 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;



Loading…
Cancel
Save