libFLAC/bitreader : Remove un-needed FLAC__CPUInfo field from FLAC__BitReader.

In FLAC 1.2.0, a new field 'FLAC__CPUInfo cpu_info' was added to the
FLAC__BitReader struct. It became useless in 1.3.0 because of various
bitreader optimizations.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
This commit is contained in:
Erik de Castro Lopo 2014-07-27 21:21:46 +10:00
parent 1930ae104c
commit 36e03def10
3 changed files with 3 additions and 5 deletions

View File

@ -88,7 +88,6 @@ struct FLAC__BitReader {
unsigned crc16_align; /* the number of bits in the current consumed word that should not be CRC'd */
FLAC__BitReaderReadCallback read_callback;
void *client_data;
FLAC__CPUInfo cpu_info;
};
static inline void crc16_update_word_(FLAC__BitReader *br, uint32_t word)
@ -231,7 +230,7 @@ void FLAC__bitreader_delete(FLAC__BitReader *br)
*
***********************************************************************/
FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__CPUInfo cpu, FLAC__BitReaderReadCallback rcb, void *cd)
FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__BitReaderReadCallback rcb, void *cd)
{
FLAC__ASSERT(0 != br);
@ -243,7 +242,6 @@ FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__CPUInfo cpu, FLAC__Bi
return false;
br->read_callback = rcb;
br->client_data = cd;
br->cpu_info = cpu;
return true;
}

View File

@ -50,7 +50,7 @@ typedef FLAC__bool (*FLAC__BitReaderReadCallback)(FLAC__byte buffer[], size_t *b
*/
FLAC__BitReader *FLAC__bitreader_new(void);
void FLAC__bitreader_delete(FLAC__BitReader *br);
FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__CPUInfo cpu, FLAC__BitReaderReadCallback rcb, void *cd);
FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__BitReaderReadCallback rcb, void *cd);
void FLAC__bitreader_free(FLAC__BitReader *br); /* does not 'free(br)' */
FLAC__bool FLAC__bitreader_clear(FLAC__BitReader *br);
void FLAC__bitreader_dump(const FLAC__BitReader *br, FILE *out);

View File

@ -434,7 +434,7 @@ static FLAC__StreamDecoderInitStatus init_stream_internal_(
/* from here on, errors are fatal */
if(!FLAC__bitreader_init(decoder->private_->input, decoder->private_->cpuinfo, read_callback_, decoder)) {
if(!FLAC__bitreader_init(decoder->private_->input, read_callback_, decoder)) {
decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
return FLAC__STREAM_DECODER_INIT_STATUS_MEMORY_ALLOCATION_ERROR;
}