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:
John Thacker 2022-09-26 19:55:59 -04:00
parent b7066e0819
commit 749a8d0912
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ parse_size_field(const unsigned char *ch, int32_t cn, int16_t *size)
}
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;
if (data[0] & 0x80) {