Revision b47a52dc libavcodec/mpegaudioenc.c

View differences:

libavcodec/mpegaudioenc.c
40 40
typedef struct MpegAudioContext {
41 41
    PutBitContext pb;
42 42
    int nb_channels;
43
    int freq, bit_rate;
44 43
    int lsf;           /* 1 if mpeg2 low bitrate selected */
45 44
    int bitrate_index; /* bit rate */
46 45
    int freq_index;
47 46
    int frame_size; /* frame size, in bits, without padding */
48
    int64_t nb_samples; /* total number of samples encoded */
49 47
    /* padding computation */
50 48
    int frame_frac, frame_frac_incr, do_padding;
51 49
    short samples_buf[MPA_MAX_CHANNELS][SAMPLES_BUF_SIZE]; /* buffer for filter */
......
79 77
    }
80 78
    bitrate = bitrate / 1000;
81 79
    s->nb_channels = channels;
82
    s->freq = freq;
83
    s->bit_rate = bitrate * 1000;
84 80
    avctx->frame_size = MPA_FRAME_SIZE;
85 81

  
86 82
    /* encoding freq */
......
778 774

  
779 775
    encode_frame(s, bit_alloc, padding);
780 776

  
781
    s->nb_samples += MPA_FRAME_SIZE;
782 777
    return put_bits_ptr(&s->pb) - s->pb.buf;
783 778
}
784 779

  

Also available in: Unified diff