From 0cb0d3cadbd10a58e650fb0717be76114ddcfbe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 3 May 2007 14:59:58 +0200 Subject: 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. --- src/combined/decoder_flac.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'src') 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); -- cgit v1.2.3