From 32cfb920625182c03eb4a4564ffdfa9d2b08f15c Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Thu, 12 Sep 2013 23:54:43 +0200 Subject: Move all decoder instances and callbacks into a session struct The struct srd_session also holds configuration parameters formerly passed to srd_session_start(). The new call srd_session_new() takes a pointer where a newly allocated pointer to struct srd_session will be stored. This pointer must be passed as the first argument to all functions that require it. The SRD_CONF_NUM_PROBES, SRD_CONF_UNITSIZE and SRD_CONF_SAMPLERATE keys must be configured with srd_config_set() before srd_session_start() is called. A new call srd_session_destroy() is also available. This cleans up all resources the session holds. This is also called from srd_exit() for all sessions. --- type_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'type_decoder.c') diff --git a/type_decoder.c b/type_decoder.c index 3f4bae9..c8ef09e 100644 --- a/type_decoder.c +++ b/type_decoder.c @@ -135,7 +135,7 @@ static PyObject *Decoder_put(PyObject *self, PyObject *args) switch (pdo->output_type) { case SRD_OUTPUT_ANN: /* Annotations are only fed to callbacks. */ - if ((cb = srd_pd_output_callback_find(pdo->output_type))) { + if ((cb = srd_pd_output_callback_find(di->sess, pdo->output_type))) { /* Annotations need converting from PyObject. */ if (convert_pyobj(di, data, &pdata->ann_format, (char ***)&pdata->data) != SRD_OK) { -- cgit v1.2.3-70-g09d2