Change few remaining instances of short to opus_int16
This commit is contained in:
parent
918acd1564
commit
359306985b
4 changed files with 11 additions and 11 deletions
|
@ -520,7 +520,7 @@ OPUS_EXPORT void opus_decoder_destroy(OpusDecoder *st);
|
|||
* @param [in] len <tt>opus_int32</tt>: size of data
|
||||
* @param [out] out_toc <tt>char*</tt>: TOC pointer
|
||||
* @param [out] frames <tt>char*[48]</tt> encapsulated frames
|
||||
* @param [out] size <tt>short[48]</tt> sizes of the encapsulated frames
|
||||
* @param [out] size <tt>opus_int16[48]</tt> sizes of the encapsulated frames
|
||||
* @param [out] payload_offset <tt>int*</tt>: returns the position of the payload within the packet (in bytes)
|
||||
* @returns number of frames
|
||||
*/
|
||||
|
@ -529,7 +529,7 @@ OPUS_EXPORT int opus_packet_parse(
|
|||
opus_int32 len,
|
||||
unsigned char *out_toc,
|
||||
const unsigned char *frames[48],
|
||||
short size[48],
|
||||
opus_int16 size[48],
|
||||
int *payload_offset
|
||||
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
|
||||
|
||||
|
|
|
@ -558,7 +558,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data,
|
|||
|
||||
}
|
||||
|
||||
static int parse_size(const unsigned char *data, opus_int32 len, short *size)
|
||||
static int parse_size(const unsigned char *data, opus_int32 len, opus_int16 *size)
|
||||
{
|
||||
if (len<1)
|
||||
{
|
||||
|
@ -580,7 +580,7 @@ static int parse_size(const unsigned char *data, opus_int32 len, short *size)
|
|||
|
||||
static int opus_packet_parse_impl(const unsigned char *data, opus_int32 len,
|
||||
int self_delimited, unsigned char *out_toc,
|
||||
const unsigned char *frames[48], short size[48], int *payload_offset)
|
||||
const unsigned char *frames[48], opus_int16 size[48], int *payload_offset)
|
||||
{
|
||||
int i, bytes;
|
||||
int count;
|
||||
|
@ -615,7 +615,7 @@ static int opus_packet_parse_impl(const unsigned char *data, opus_int32 len,
|
|||
return OPUS_INVALID_PACKET;
|
||||
last_size = len/2;
|
||||
/* If last_size doesn't fit in size[0], we'll catch it later */
|
||||
size[0] = (short)last_size;
|
||||
size[0] = (opus_int16)last_size;
|
||||
}
|
||||
break;
|
||||
/* Two VBR frames */
|
||||
|
@ -676,7 +676,7 @@ static int opus_packet_parse_impl(const unsigned char *data, opus_int32 len,
|
|||
if (last_size*count!=len)
|
||||
return OPUS_INVALID_PACKET;
|
||||
for (i=0;i<count-1;i++)
|
||||
size[i] = (short)last_size;
|
||||
size[i] = (opus_int16)last_size;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -704,7 +704,7 @@ static int opus_packet_parse_impl(const unsigned char *data, opus_int32 len,
|
|||
1275. Reject them here.*/
|
||||
if (last_size > 1275)
|
||||
return OPUS_INVALID_PACKET;
|
||||
size[count-1] = (short)last_size;
|
||||
size[count-1] = (opus_int16)last_size;
|
||||
}
|
||||
|
||||
if (frames)
|
||||
|
@ -727,7 +727,7 @@ static int opus_packet_parse_impl(const unsigned char *data, opus_int32 len,
|
|||
|
||||
int opus_packet_parse(const unsigned char *data, opus_int32 len,
|
||||
unsigned char *out_toc, const unsigned char *frames[48],
|
||||
short size[48], int *payload_offset)
|
||||
opus_int16 size[48], int *payload_offset)
|
||||
{
|
||||
return opus_packet_parse_impl(data, len, 0, out_toc,
|
||||
frames, size, payload_offset);
|
||||
|
@ -743,7 +743,7 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data,
|
|||
int tot_offset;
|
||||
int packet_frame_size, packet_bandwidth, packet_mode, packet_stream_channels;
|
||||
/* 48 x 2.5 ms = 120 ms */
|
||||
short size[48];
|
||||
opus_int16 size[48];
|
||||
if (decode_fec<0 || decode_fec>1)
|
||||
return OPUS_BAD_ARG;
|
||||
/* For FEC/PLC, frame_size has to be to have a multiple of 2.5 ms */
|
||||
|
|
|
@ -37,7 +37,7 @@ struct OpusRepacketizer {
|
|||
unsigned char toc;
|
||||
int nb_frames;
|
||||
const unsigned char *frames[48];
|
||||
short len[48];
|
||||
opus_int16 len[48];
|
||||
int framesize;
|
||||
};
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int
|
|||
{
|
||||
int i, count;
|
||||
opus_int32 tot_size;
|
||||
short *len;
|
||||
opus_int16 *len;
|
||||
const unsigned char **frames;
|
||||
|
||||
if (begin<0 || begin>=end || end>rp->nb_frames)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue