pass cpu info into bitreader
authorJosh Coalson <jcoalson@users.sourceforce.net>
Tue, 13 Mar 2007 16:13:52 +0000 (16:13 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Tue, 13 Mar 2007 16:13:52 +0000 (16:13 +0000)
src/libFLAC/include/private/bitreader.h
src/libFLAC/stream_decoder.c

index 6fd0147..d08d650 100644 (file)
@@ -34,6 +34,7 @@
 
 #include <stdio.h> /* for FILE */
 #include "FLAC/ordinals.h"
+#include "cpu.h"
 
 /*
  * opaque structure definition
@@ -48,7 +49,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__BitReaderReadCallback rcb, void *cd);
+FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__CPUInfo cpu, 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);
index 0da4661..544f6d7 100644 (file)
@@ -442,7 +442,7 @@ static FLAC__StreamDecoderInitStatus init_stream_internal_(
 
        /* from here on, errors are fatal */
 
-       if(!FLAC__bitreader_init(decoder->private_->input, read_callback_, decoder)) {
+       if(!FLAC__bitreader_init(decoder->private_->input, decoder->private_->cpuinfo, read_callback_, decoder)) {
                decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
                return FLAC__STREAM_DECODER_INIT_STATUS_MEMORY_ALLOCATION_ERROR;
        }