Commit 3aa91d4f authored by jbr's avatar jbr

flacenc: remove unneeded context variable, 'ch_code'


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18083 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2c52ee9b
...@@ -81,7 +81,6 @@ typedef struct FlacFrame { ...@@ -81,7 +81,6 @@ typedef struct FlacFrame {
typedef struct FlacEncodeContext { typedef struct FlacEncodeContext {
PutBitContext pb; PutBitContext pb;
int channels; int channels;
int ch_code;
int samplerate; int samplerate;
int sr_code[2]; int sr_code[2];
int min_framesize; int min_framesize;
...@@ -178,7 +177,6 @@ static av_cold int flac_encode_init(AVCodecContext *avctx) ...@@ -178,7 +177,6 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
return -1; return -1;
} }
s->channels = channels; s->channels = channels;
s->ch_code = s->channels-1;
/* find samplerate in table */ /* find samplerate in table */
if(freq < 1) if(freq < 1)
...@@ -1073,7 +1071,7 @@ static void output_frame_header(FlacEncodeContext *s) ...@@ -1073,7 +1071,7 @@ static void output_frame_header(FlacEncodeContext *s)
put_bits(&s->pb, 4, frame->bs_code[0]); put_bits(&s->pb, 4, frame->bs_code[0]);
put_bits(&s->pb, 4, s->sr_code[0]); put_bits(&s->pb, 4, s->sr_code[0]);
if(frame->ch_mode == FLAC_CHMODE_INDEPENDENT) { if(frame->ch_mode == FLAC_CHMODE_INDEPENDENT) {
put_bits(&s->pb, 4, s->ch_code); put_bits(&s->pb, 4, s->channels-1);
} else { } else {
put_bits(&s->pb, 4, frame->ch_mode); put_bits(&s->pb, 4, frame->ch_mode);
} }
......
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