Commit 4025fcc7 authored by jbr's avatar jbr

flacdec: remove unneeded variable, 'assignment'


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18085 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 99554b62
...@@ -492,21 +492,19 @@ static inline int decode_subframe(FLACContext *s, int channel) ...@@ -492,21 +492,19 @@ static inline int decode_subframe(FLACContext *s, int channel)
static int decode_frame(FLACContext *s, int alloc_data_size) 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; int ch_mode, bps, blocksize, samplerate;
blocksize_code = get_bits(&s->gb, 4); blocksize_code = get_bits(&s->gb, 4);
sample_rate_code = get_bits(&s->gb, 4); sample_rate_code = get_bits(&s->gb, 4);
assignment = get_bits(&s->gb, 4); /* channel assignment */ ch_mode = get_bits(&s->gb, 4); /* channel assignment */
if (assignment < FLAC_MAX_CHANNELS && s->channels == assignment+1) if (ch_mode < FLAC_MAX_CHANNELS && s->channels == ch_mode+1) {
ch_mode = FLAC_CHMODE_INDEPENDENT; ch_mode = FLAC_CHMODE_INDEPENDENT;
else if (assignment >= FLAC_MAX_CHANNELS && assignment < 11 && s->channels == 2) } else if (ch_mode > FLAC_CHMODE_MID_SIDE || s->channels != 2) {
ch_mode = assignment;
else {
av_log(s->avctx, AV_LOG_ERROR, "unsupported channel assignment %d (channels=%d)\n", av_log(s->avctx, AV_LOG_ERROR, "unsupported channel assignment %d (channels=%d)\n",
assignment, s->channels); ch_mode, s->channels);
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment