compiler warning cleanup (part 2)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2488 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
76ed494b2e
commit
f48d50f0ce
|
@ -253,7 +253,7 @@ static inline int8_t switch_bitpack_in(switch_bitpack_t *pack, switch_byte_t in)
|
||||||
if (pack->mode == SWITCH_BITPACK_MODE_RFC3551) {
|
if (pack->mode == SWITCH_BITPACK_MODE_RFC3551) {
|
||||||
in <<= pack->shiftby;
|
in <<= pack->shiftby;
|
||||||
*pack->cur |= in;
|
*pack->cur |= in;
|
||||||
pack->shiftby += pack->frame_bits;
|
pack->shiftby = (switch_byte_t)(pack->shiftby + pack->frame_bits);
|
||||||
} else {
|
} else {
|
||||||
*pack->cur <<= pack->frame_bits;
|
*pack->cur <<= pack->frame_bits;
|
||||||
*pack->cur |= in;
|
*pack->cur |= in;
|
||||||
|
|
|
@ -41,7 +41,7 @@ typedef int (*decoder_t)(int, int, g726_state *);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
g726_state context;
|
g726_state context;
|
||||||
uint8_t bits_per_frame;
|
switch_byte_t bits_per_frame;
|
||||||
encoder_t encoder;
|
encoder_t encoder;
|
||||||
decoder_t decoder;
|
decoder_t decoder;
|
||||||
switch_bitpack_t pack;
|
switch_bitpack_t pack;
|
||||||
|
@ -55,7 +55,7 @@ typedef struct {
|
||||||
static switch_status_t switch_g726_init(switch_codec_t *codec, switch_codec_flag_t flags,
|
static switch_status_t switch_g726_init(switch_codec_t *codec, switch_codec_flag_t flags,
|
||||||
const switch_codec_settings_t *codec_settings)
|
const switch_codec_settings_t *codec_settings)
|
||||||
{
|
{
|
||||||
switch_byte_t encoding, decoding;
|
uint32_t encoding, decoding;
|
||||||
g726_handle_t *handle;
|
g726_handle_t *handle;
|
||||||
|
|
||||||
encoding = (flags & SWITCH_CODEC_FLAG_ENCODE);
|
encoding = (flags & SWITCH_CODEC_FLAG_ENCODE);
|
||||||
|
@ -95,7 +95,7 @@ static switch_status_t switch_g726_init(switch_codec_t *codec, switch_codec_flag
|
||||||
|
|
||||||
g726_init_state(&handle->context);
|
g726_init_state(&handle->context);
|
||||||
codec->private_info = handle;
|
codec->private_info = handle;
|
||||||
handle->bits_per_frame = codec->implementation->bits_per_second / (codec->implementation->samples_per_second);
|
handle->bits_per_frame = (switch_byte_t) codec->implementation->bits_per_second / (codec->implementation->samples_per_second);
|
||||||
handle->mode = (flags & SWITCH_CODEC_FLAG_AAL2 || strstr(codec->implementation->iananame, "AAL2"))
|
handle->mode = (flags & SWITCH_CODEC_FLAG_AAL2 || strstr(codec->implementation->iananame, "AAL2"))
|
||||||
? SWITCH_BITPACK_MODE_AAL2 : SWITCH_BITPACK_MODE_RFC3551;
|
? SWITCH_BITPACK_MODE_AAL2 : SWITCH_BITPACK_MODE_RFC3551;
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
@ -137,7 +137,7 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec,
|
||||||
if (decoded_data_len % len == 0) {
|
if (decoded_data_len % len == 0) {
|
||||||
uint32_t new_len = 0;
|
uint32_t new_len = 0;
|
||||||
int16_t *ddp = decoded_data;
|
int16_t *ddp = decoded_data;
|
||||||
uint8_t *edp = encoded_data;
|
switch_byte_t *edp = encoded_data;
|
||||||
uint32_t x, loops = decoded_data_len / (sizeof(*ddp));
|
uint32_t x, loops = decoded_data_len / (sizeof(*ddp));
|
||||||
|
|
||||||
switch_bitpack_init(&handle->pack, handle->bits_per_frame, edp, *encoded_data_len, handle->mode);
|
switch_bitpack_init(&handle->pack, handle->bits_per_frame, edp, *encoded_data_len, handle->mode);
|
||||||
|
|
Loading…
Reference in New Issue