summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pjmedia/src/pjmedia-codec/speex/sb_celp.c2
-rw-r--r--pjmedia/src/pjmedia-codec/speex_codec.c10
2 files changed, 8 insertions, 4 deletions
diff --git a/pjmedia/src/pjmedia-codec/speex/sb_celp.c b/pjmedia/src/pjmedia-codec/speex/sb_celp.c
index 465a538f..fe38891b 100644
--- a/pjmedia/src/pjmedia-codec/speex/sb_celp.c
+++ b/pjmedia/src/pjmedia-codec/speex/sb_celp.c
@@ -361,6 +361,7 @@ void sb_encoder_destroy(void *state)
speex_free(st->interp_lpc);
speex_free(st->interp_qlpc);
speex_free(st->pi_gain);
+ speex_free(st->low_innov);
speex_free(st->mem_sp);
speex_free(st->mem_sp2);
@@ -924,6 +925,7 @@ void sb_decoder_destroy(void *state)
speex_free(st->interp_qlpc);
speex_free(st->pi_gain);
speex_free(st->mem_sp);
+ speex_free(st->low_innov);
speex_free(state);
}
diff --git a/pjmedia/src/pjmedia-codec/speex_codec.c b/pjmedia/src/pjmedia-codec/speex_codec.c
index e4dda97a..8625e72b 100644
--- a/pjmedia/src/pjmedia-codec/speex_codec.c
+++ b/pjmedia/src/pjmedia-codec/speex_codec.c
@@ -310,12 +310,17 @@ PJ_DEF(pj_status_t) pjmedia_codec_speex_deinit(void)
return PJ_SUCCESS;
}
- /* We don't want to deinit if there's outstanding codec. */
pj_mutex_lock(spx_factory.mutex);
+
+ /* We don't want to deinit if there's outstanding codec. */
+ /* This is silly, as we'll always have codec in the list if
+ we ever allocate a codec! A better behavior maybe is to
+ deallocate all codecs in the list.
if (!pj_list_empty(&spx_factory.codec_list)) {
pj_mutex_unlock(spx_factory.mutex);
return PJ_EBUSY;
}
+ */
/* Get the codec manager. */
codec_mgr = pjmedia_endpt_get_codec_mgr(spx_factory.endpt);
@@ -742,9 +747,6 @@ static pj_status_t spx_codec_decode( pjmedia_codec *codec,
return PJ_SUCCESS;
}
- /* Initialization of the structure that holds the bits */
- speex_bits_init(&spx->dec_bits);
-
/* Copy the data into the bit-stream struct */
speex_bits_read_from(&spx->dec_bits, input->buf, input->size);