diff --git a/libcelt/dump_modes.c b/libcelt/dump_modes.c index 512b7aa0..c32be072 100644 --- a/libcelt/dump_modes.c +++ b/libcelt/dump_modes.c @@ -197,7 +197,6 @@ void dump_modes(FILE *file, CELTMode **modes, int nb_modes) /* Print the actual mode data */ fprintf(file, "static const CELTMode mode%d_%d_%d = {\n", mode->Fs, mdctSize, mode->overlap); - fprintf(file, "0x%x,\t/* marker */\n", 0xa110ca7e); fprintf(file, INT32 ",\t/* Fs */\n", mode->Fs); fprintf(file, "%d,\t/* overlap */\n", mode->overlap); fprintf(file, "%d,\t/* nbEBands */\n", mode->nbEBands); @@ -223,7 +222,6 @@ void dump_modes(FILE *file, CELTMode **modes, int nb_modes) fprintf(file, "logN%d_%d,\t/* logN */\n", mode->Fs, mdctSize); fprintf(file, "{%d, cache_index%d_%d, cache_bits%d_%d},\t/* cache */\n", mode->cache.size, mode->Fs, mdctSize, mode->Fs, mdctSize); - fprintf(file, "0x%x,\t/* marker */\n", 0xa110ca7e); fprintf(file, "};\n"); } fprintf(file, "\n"); diff --git a/libcelt/modes.c b/libcelt/modes.c index 291f1316..9a02306b 100644 --- a/libcelt/modes.c +++ b/libcelt/modes.c @@ -46,10 +46,6 @@ #include "static_modes.c" #endif -#define MODEVALID 0xa110ca7e -#define MODEPARTIAL 0x7eca10a1 -#define MODEFREED 0xb10cf8ee - #ifndef M_PI #define M_PI 3.141592653 #endif @@ -311,7 +307,6 @@ CELTMode *celt_mode_create(celt_int32 Fs, int frame_size, int *error) mode = celt_alloc(sizeof(CELTMode)); if (mode==NULL) goto failure; - mode->marker_start = MODEPARTIAL; mode->Fs = Fs; /* Pre/de-emphasis depends on sampling rate. The "standard" pre-emphasis @@ -415,8 +410,6 @@ CELTMode *celt_mode_create(celt_int32 Fs, int frame_size, int *error) mode->prob = quant_prob_alloc(mode); if (mode->prob==NULL) goto failure; - mode->marker_start = MODEVALID; - mode->marker_end = MODEVALID; if (error) *error = CELT_OK; @@ -440,18 +433,6 @@ void celt_mode_destroy(CELTMode *mode) return; } - if (mode->marker_start == MODEFREED || mode->marker_end == MODEFREED) - { - celt_warning("Freeing a mode which has already been freed"); - return; - } - - if (mode->marker_start != MODEVALID && mode->marker_start != MODEPARTIAL) - { - celt_warning("This is not a valid CELT mode structure"); - return; - } - mode->marker_start = MODEFREED; celt_free((celt_int16*)mode->eBands); celt_free((celt_int16*)mode->allocVectors); @@ -463,7 +444,6 @@ void celt_mode_destroy(CELTMode *mode) clt_mdct_clear(&mode->mdct); quant_prob_free(mode->prob); - mode->marker_end = MODEFREED; celt_free((CELTMode *)mode); #endif } diff --git a/libcelt/modes.h b/libcelt/modes.h index c2a14c5f..c7bd526c 100644 --- a/libcelt/modes.h +++ b/libcelt/modes.h @@ -77,7 +77,6 @@ typedef struct { @brief Mode definition */ struct CELTMode { - celt_uint32 marker_start; celt_int32 Fs; int overlap; @@ -102,7 +101,6 @@ struct CELTMode { const celt_int16 *logN; PulseCache cache; - celt_uint32 marker_end; }; /* Prototypes for _ec versions of the encoder/decoder calls (not public) */