aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/flacenc.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-03-21 00:45:44 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-03-21 00:45:44 +0000
commitad52941faa9c95c9b078e0bc198d27424c75cd9e (patch)
tree619d56d78af4446e62fe293b2a90b62c381f0411 /libavcodec/flacenc.c
parent3159780b18976dfd108576da473f4f97a9d7ca6f (diff)
downloadffmpeg-ad52941faa9c95c9b078e0bc198d27424c75cd9e.tar.gz
flacenc: remove unneeded context variable, 'ch_code'
Originally committed as revision 18083 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/flacenc.c')
-rw-r--r--libavcodec/flacenc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 1b2e52a3e6..c6160c511b 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -81,7 +81,6 @@ typedef struct FlacFrame {
typedef struct FlacEncodeContext {
PutBitContext pb;
int channels;
- int ch_code;
int samplerate;
int sr_code[2];
int min_framesize;
@@ -178,7 +177,6 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
return -1;
}
s->channels = channels;
- s->ch_code = s->channels-1;
/* find samplerate in table */
if(freq < 1)
@@ -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, s->sr_code[0]);
if(frame->ch_mode == FLAC_CHMODE_INDEPENDENT) {
- put_bits(&s->pb, 4, s->ch_code);
+ put_bits(&s->pb, 4, s->channels-1);
} else {
put_bits(&s->pb, 4, frame->ch_mode);
}