forked from osmocom/wireshark
opus: Don't overflow a signed 16-bit integer
The internal sample rate of 48KHz overflows a signed 16-bit integer, and causes incorrect calculations. Use an unsigned integer. Fix #18378
This commit is contained in:
parent
b7066e0819
commit
749a8d0912
|
@ -126,7 +126,7 @@ parse_size_field(const unsigned char *ch, int32_t cn, int16_t *size)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int16_t
|
static int16_t
|
||||||
opus_packet_get_samples_per_frame(const unsigned char *data, int16_t Fs)
|
opus_packet_get_samples_per_frame(const unsigned char *data, uint16_t Fs)
|
||||||
{
|
{
|
||||||
int audiosize;
|
int audiosize;
|
||||||
if (data[0] & 0x80) {
|
if (data[0] & 0x80) {
|
||||||
|
|
Loading…
Reference in New Issue