From b47a52dc8676c6e44b5e5746431e047a537f319c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= <rafael.carre@gmail.com>
Date: Thu, 1 Jul 2010 05:17:02 +0000
Subject: [PATCH] mpegaudioenc: Remove write-only variables from the context.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Patch by Rafaël Carré (rafael <dot> carre <at> gmail).

Originally committed as revision 23926 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/mpegaudioenc.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
index 264175ecc55..ce1524ba917 100644
--- a/libavcodec/mpegaudioenc.c
+++ b/libavcodec/mpegaudioenc.c
@@ -40,12 +40,10 @@
 typedef struct MpegAudioContext {
     PutBitContext pb;
     int nb_channels;
-    int freq, bit_rate;
     int lsf;           /* 1 if mpeg2 low bitrate selected */
     int bitrate_index; /* bit rate */
     int freq_index;
     int frame_size; /* frame size, in bits, without padding */
-    int64_t nb_samples; /* total number of samples encoded */
     /* padding computation */
     int frame_frac, frame_frac_incr, do_padding;
     short samples_buf[MPA_MAX_CHANNELS][SAMPLES_BUF_SIZE]; /* buffer for filter */
@@ -79,8 +77,6 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx)
     }
     bitrate = bitrate / 1000;
     s->nb_channels = channels;
-    s->freq = freq;
-    s->bit_rate = bitrate * 1000;
     avctx->frame_size = MPA_FRAME_SIZE;
 
     /* encoding freq */
@@ -778,7 +774,6 @@ static int MPA_encode_frame(AVCodecContext *avctx,
 
     encode_frame(s, bit_alloc, padding);
 
-    s->nb_samples += MPA_FRAME_SIZE;
     return put_bits_ptr(&s->pb) - s->pb.buf;
 }
 
-- 
GitLab