aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/codecs/iLBC
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2020-12-28 12:45:41 +0000
committerAndersBroman <a.broman58@gmail.com>2020-12-28 12:45:41 +0000
commit93f6aa2c696520cc57b269cce5f0fe58de286a52 (patch)
treef8ea68a330752d8aa3410c9b9ed6b372eaa8d345 /plugins/codecs/iLBC
parent1eff9c8982ecdc6cec38f26b512ef0a40089b5cc (diff)
iLBC: fix deprecation type and cast.
Starting from libilbc 3.0.0 the type iLBC_decinst_t has been marked deprecated. Other fixes rely on function prototype requiring uint8_t pointer.
Diffstat (limited to 'plugins/codecs/iLBC')
-rw-r--r--plugins/codecs/iLBC/iLBCdecode.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/codecs/iLBC/iLBCdecode.c b/plugins/codecs/iLBC/iLBCdecode.c
index c5e2a2873d..bb85b775a2 100644
--- a/plugins/codecs/iLBC/iLBCdecode.c
+++ b/plugins/codecs/iLBC/iLBCdecode.c
@@ -9,6 +9,7 @@
*/
#include "config.h"
+
#include <stdio.h>
#include <glib.h>
@@ -24,7 +25,11 @@
#define SAMPLE_SIZE 2
typedef struct {
+#ifdef LIBILBC_VERSION_MAJOR
+ IlbcDecoderInstance *ilbc_ctx; /* Real iLBC context */
+#else
iLBC_decinst_t *ilbc_ctx; /* Real iLBC context */
+#endif
guint8 payload_len; /* Remember last payload_len */
} ilbc_ctx_t;
@@ -63,7 +68,11 @@ codec_iLBC_decode(void *ctx, const void *inputBytes, size_t inputBytesSize,
void *outputSamples, size_t *outputSamplesSize)
{
int16_t speechType; // Not used in Wireshark code
+#ifdef LIBILBC_VERSION_MAJOR
+ int8_t *dataIn = (int8_t *)inputBytes;
+#else
int16_t *dataIn = (int16_t *)inputBytes;
+#endif
int16_t *dataOut = (int16_t *)outputSamples;
ilbc_ctx_t *dataCtx = (ilbc_ctx_t *)ctx;
size_t outputSamplesCount;