diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-05-03 14:59:58 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-05-03 14:59:58 +0200 |
commit | 0cb0d3cadbd10a58e650fb0717be76114ddcfbe4 (patch) | |
tree | 2c37cbfbed816d641789ad7a42d3b00ed65b2dae | |
parent | c33d5a56d01e53398b84276f8ebef32f7cd965c3 (diff) | |
download | xine-lib-0cb0d3cadbd10a58e650fb0717be76114ddcfbe4.tar.gz xine-lib-0cb0d3cadbd10a58e650fb0717be76114ddcfbe4.tar.bz2 |
Reduce size of flac_decoder_t structure: output_mode and output_sampling_rate are not used; sample_rate, channels and bits_per_sample can be local to flac_decode_data on the STDHEADER codepath.
Reorder to fill hole.
-rw-r--r-- | src/combined/decoder_flac.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/src/combined/decoder_flac.c b/src/combined/decoder_flac.c index 9b77cc27d..52fbde49f 100644 --- a/src/combined/decoder_flac.c +++ b/src/combined/decoder_flac.c @@ -59,23 +59,17 @@ typedef struct flac_decoder_s { int64_t pts; - int output_sampling_rate; - int output_open; - int output_mode; - xine_stream_t *stream; FLAC__StreamDecoder *flac_decoder; - int sample_rate; - int bits_per_sample; - int channels; - unsigned char *buf; int buf_size; int buf_pos; int min_size; + int output_open; + } flac_decoder_t; /* @@ -249,21 +243,18 @@ flac_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) */ if (buf->decoder_flags & BUF_FLAG_STDHEADER) { - int mode = AO_CAP_MODE_MONO; - - this->sample_rate = buf->decoder_info[1]; - this->bits_per_sample = buf->decoder_info[2]; - this->channels = buf->decoder_info[3]; - - mode = _x_ao_channels2mode(this->channels); + const int sample_rate = buf->decoder_info[1]; + const int bits_per_sample = buf->decoder_info[2]; + const int channels = buf->decoder_info[3]; + const int mode = _x_ao_channels2mode(channels); if (!this->output_open) { this->output_open = this->stream->audio_out->open ( this->stream->audio_out, this->stream, - this->bits_per_sample, - this->sample_rate, + bits_per_sample, + sample_rate, mode); |