summaryrefslogtreecommitdiffstats
path: root/plugins/codecs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
commit9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch)
tree2784370cda9bbf2da9114d70f05399c0b229d28c /plugins/codecs
parentAdding debian version 4.2.6-1. (diff)
downloadwireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz
wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/codecs')
-rw-r--r--plugins/codecs/G711/G711decode.c12
-rw-r--r--plugins/codecs/G729/G729decode.c8
-rw-r--r--plugins/codecs/iLBC/iLBCdecode.c2
-rw-r--r--plugins/codecs/l16_mono/README2
-rw-r--r--plugins/codecs/l16_mono/l16decode.c10
-rw-r--r--plugins/codecs/sbc/sbc.c8
6 files changed, 21 insertions, 21 deletions
diff --git a/plugins/codecs/G711/G711decode.c b/plugins/codecs/G711/G711decode.c
index e15c4076..c1eae265 100644
--- a/plugins/codecs/G711/G711decode.c
+++ b/plugins/codecs/G711/G711decode.c
@@ -15,7 +15,7 @@
#include "wsutil/codecs.h"
#include "ws_attributes.h"
-static gint16 ulaw_exp_table[256] = {
+static int16_t ulaw_exp_table[256] = {
-32124,-31100,-30076,-29052,-28028,-27004,-25980,-24956,
-23932,-22908,-21884,-20860,-19836,-18812,-17788,-16764,
-15996,-15484,-14972,-14460,-13948,-13436,-12924,-12412,
@@ -50,7 +50,7 @@ static gint16 ulaw_exp_table[256] = {
56, 48, 40, 32, 24, 16, 8, 0
};
-static gint16 alaw_exp_table[256] = {
+static int16_t alaw_exp_table[256] = {
-5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736,
-7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784,
-2752, -2624, -3008, -2880, -2240, -2112, -2496, -2368,
@@ -116,8 +116,8 @@ codec_g711u_decode(codec_context_t *ctx _U_,
const void *inputBytes, size_t inputBytesSize,
void *outputSamples, size_t *outputSamplesSize)
{
- const guint8 *dataIn = (const guint8 *) inputBytes;
- gint16 *dataOut = (gint16 *) outputSamples;
+ const uint8_t *dataIn = (const uint8_t *) inputBytes;
+ int16_t *dataOut = (int16_t *) outputSamples;
size_t i;
if (!outputSamples || !outputSamplesSize) {
@@ -162,8 +162,8 @@ codec_g711a_decode(codec_context_t *ctx _U_,
const void *inputBytes, size_t inputBytesSize,
void *outputSamples, size_t *outputSamplesSize)
{
- const guint8 *dataIn = (const guint8 *) inputBytes;
- gint16 *dataOut = (gint16 *) outputSamples;
+ const uint8_t *dataIn = (const uint8_t *) inputBytes;
+ int16_t *dataOut = (int16_t *) outputSamples;
size_t i;
if (!outputSamples || !outputSamplesSize) {
diff --git a/plugins/codecs/G729/G729decode.c b/plugins/codecs/G729/G729decode.c
index 7bb564e6..fc65faba 100644
--- a/plugins/codecs/G729/G729decode.c
+++ b/plugins/codecs/G729/G729decode.c
@@ -48,8 +48,8 @@ codec_g729_decode(codec_context_t *ctx,
void *outputSamples, size_t *outputSamplesSize)
{
bcg729DecoderChannelContextStruct *state = (bcg729DecoderChannelContextStruct *)ctx->priv;
- const guint8 *dataIn = (const guint8 *) inputBytes;
- gint16 *dataOut = (gint16 *) outputSamples;
+ const uint8_t *dataIn = (const uint8_t *) inputBytes;
+ int16_t *dataOut = (int16_t *) outputSamples;
size_t i;
if (!ctx) {
@@ -78,11 +78,11 @@ codec_g729_decode(codec_context_t *ctx,
fixed to accept a const pointer.) Cast away the problem for now;
in the future we could check the version of the library.
*/
- bcg729Decoder(state, (guint8 *)dataIn + i*10, 10, 0, 0, 0, dataOut + i*80);
+ bcg729Decoder(state, (uint8_t *)dataIn + i*10, 10, 0, 0, 0, dataOut + i*80);
}
for (; i < full_frames + sid_frames; i++) {
- bcg729Decoder(state, (guint8 *)dataIn + full_frames*10 + (i - full_frames)*2, 2, 0, 1, 0, dataOut + i*80);
+ bcg729Decoder(state, (uint8_t *)dataIn + full_frames*10 + (i - full_frames)*2, 2, 0, 1, 0, dataOut + i*80);
}
*outputSamplesSize = 80*2*(full_frames + sid_frames);
return *outputSamplesSize;
diff --git a/plugins/codecs/iLBC/iLBCdecode.c b/plugins/codecs/iLBC/iLBCdecode.c
index d127f160..f551e2e5 100644
--- a/plugins/codecs/iLBC/iLBCdecode.c
+++ b/plugins/codecs/iLBC/iLBCdecode.c
@@ -30,7 +30,7 @@ typedef struct {
#else
iLBC_decinst_t *ilbc_ctx; /* Real iLBC context */
#endif
- guint8 payload_len; /* Remember last payload_len */
+ uint8_t payload_len; /* Remember last payload_len */
} ilbc_ctx_t;
void codec_register_iLBC(void);
diff --git a/plugins/codecs/l16_mono/README b/plugins/codecs/l16_mono/README
index 993730a4..8faa8e1c 100644
--- a/plugins/codecs/l16_mono/README
+++ b/plugins/codecs/l16_mono/README
@@ -1,3 +1,3 @@
This codec plugin serves a dual purpose.
-First it is to add L16 codec suppport to Wireshark.
+First it is to add L16 codec support to Wireshark.
Second it is an illustration of a basic codec plugin module.
diff --git a/plugins/codecs/l16_mono/l16decode.c b/plugins/codecs/l16_mono/l16decode.c
index 12994cfc..6ef292f4 100644
--- a/plugins/codecs/l16_mono/l16decode.c
+++ b/plugins/codecs/l16_mono/l16decode.c
@@ -70,8 +70,8 @@ codec_l16_decode(codec_context_t *ctx _U_,
const void *inputBytes, size_t inputBytesSize,
void *outputSamples, size_t *outputSamplesSize)
{
- const guint16 *dataIn = (const guint16 *)inputBytes;
- guint16 *dataOut = (gint16 *)outputSamples;
+ const uint16_t *dataIn = (const uint16_t *)inputBytes;
+ uint16_t *dataOut = (int16_t *)outputSamples;
size_t i;
unsigned channels = ctx->channels ? ctx->channels : 1;
if (!outputSamples || !outputSamplesSize)
@@ -82,11 +82,11 @@ codec_l16_decode(codec_context_t *ctx _U_,
/* Downmix to mono. No worries about overflow because tmp is 32 bit. */
for (i=0; i<inputBytesSize/(2 * channels); i++)
{
- gint32 tmp = 0;
+ int32_t tmp = 0;
for (unsigned j=0; j < channels; j++) {
- tmp += (gint16)g_ntohs(dataIn[channels*i + j]);
+ tmp += (int16_t)g_ntohs(dataIn[channels*i + j]);
}
- dataOut[i] = (gint16)(tmp / channels);
+ dataOut[i] = (int16_t)(tmp / channels);
}
*outputSamplesSize = inputBytesSize/channels;
diff --git a/plugins/codecs/sbc/sbc.c b/plugins/codecs/sbc/sbc.c
index 5ac31b94..79f5b11f 100644
--- a/plugins/codecs/sbc/sbc.c
+++ b/plugins/codecs/sbc/sbc.c
@@ -90,11 +90,11 @@ codec_sbc_decode(codec_context_t *ctx,
size_t len;
size_t framelen;
size_t xframe_pos = 0;
- const guint8 *data_in = (const guint8 *) input;
- guint8 *data_out = (guint8 *) output;
+ const uint8_t *data_in = (const uint8_t *) input;
+ uint8_t *data_out = (uint8_t *) output;
sbc_t *sbc = (sbc_t *) ctx->priv;
- guint8 *i_data;
- guint8 tmp;
+ uint8_t *i_data;
+ uint8_t tmp;
if (!output || !outputSizeBytes) {
return size_out;