Mercurial > libavcodec.hg
changeset 9211:2acf888276af libavcodec
flacdec: remove unneeded variable, 'assignment'
author | jbr |
---|---|
date | Sat, 21 Mar 2009 00:48:07 +0000 |
parents | ca10c935dc56 |
children | c7a8e302b98a |
files | flacdec.c |
diffstat | 1 files changed, 5 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/flacdec.c Sat Mar 21 00:47:04 2009 +0000 +++ b/flacdec.c Sat Mar 21 00:48:07 2009 +0000 @@ -492,21 +492,19 @@ static int decode_frame(FLACContext *s, int alloc_data_size) { - int blocksize_code, sample_rate_code, sample_size_code, assignment, i, crc8; + int blocksize_code, sample_rate_code, sample_size_code, i, crc8; int ch_mode, bps, blocksize, samplerate; blocksize_code = get_bits(&s->gb, 4); sample_rate_code = get_bits(&s->gb, 4); - assignment = get_bits(&s->gb, 4); /* channel assignment */ - if (assignment < FLAC_MAX_CHANNELS && s->channels == assignment+1) + ch_mode = get_bits(&s->gb, 4); /* channel assignment */ + if (ch_mode < FLAC_MAX_CHANNELS && s->channels == ch_mode+1) { ch_mode = FLAC_CHMODE_INDEPENDENT; - else if (assignment >= FLAC_MAX_CHANNELS && assignment < 11 && s->channels == 2) - ch_mode = assignment; - else { + } else if (ch_mode > FLAC_CHMODE_MID_SIDE || s->channels != 2) { av_log(s->avctx, AV_LOG_ERROR, "unsupported channel assignment %d (channels=%d)\n", - assignment, s->channels); + ch_mode, s->channels); return -1; }