diff --git a/src/opus_encoder.c b/src/opus_encoder.c index 30fe49392770de301a766ad6b9b7ce02ac43668a..2af089e99e8a30ffcbf038b6bf0dc8b3f074d814 100644 --- a/src/opus_encoder.c +++ b/src/opus_encoder.c @@ -263,7 +263,6 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size, int ret=0; int nBytes; ec_enc enc; - int silk_internal_bandwidth=-1; int bytes_target; int prefill=0; int start_band = 0; @@ -557,18 +556,6 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size, data[-1] = gen_toc(st->mode, st->Fs/frame_size, st->bandwidth, st->stream_channels); return 1; } - /* Extract SILK internal bandwidth for signaling in first byte */ - if( st->mode == MODE_SILK_ONLY ) { - if( st->silk_mode.internalSampleRate == 8000 ) { - silk_internal_bandwidth = OPUS_BANDWIDTH_NARROWBAND; - } else if( st->silk_mode.internalSampleRate == 12000 ) { - silk_internal_bandwidth = OPUS_BANDWIDTH_MEDIUMBAND; - } else if( st->silk_mode.internalSampleRate == 16000 ) { - silk_internal_bandwidth = OPUS_BANDWIDTH_WIDEBAND; - } - } else { - SKP_assert( st->silk_mode.internalSampleRate == 16000 ); - } } /* CELT processing */ diff --git a/src/repacketizer.c b/src/repacketizer.c index 55b1dbf1dab57659e5da4ed21b5bbdfd0f5ab009..4ef8e1ba11f0be80527e170a63cca603dde38c82 100644 --- a/src/repacketizer.c +++ b/src/repacketizer.c @@ -60,7 +60,7 @@ OpusRepacketizer *opus_repacketizer_init(OpusRepacketizer *rp) OpusRepacketizer *opus_repacketizer_create(void) { - return opus_repacketizer_init(opus_alloc(opus_repacketizer_get_size())); + return opus_repacketizer_init((OpusRepacketizer *)opus_alloc(opus_repacketizer_get_size())); } void opus_repacketizer_destroy(OpusRepacketizer *rp)