]> git.ipfire.org Git - thirdparty/asterisk.git/commit
bridge_softmix: use a float type to store the internal REMB bitrate
authorKevin Harwell <kharwell@digium.com>
Wed, 27 Mar 2019 17:59:30 +0000 (12:59 -0500)
committerKevin Harwell <kharwell@digium.com>
Tue, 2 Apr 2019 16:32:58 +0000 (11:32 -0500)
commit94eeba61473aa2cdbb43eefb94e60e8fe18e02ca
treefc2576b9db37dfc82a7d5a347dd5e11ef25b5f11
parente1b0961fcecf97ee93737cd1cb253b121876f368
bridge_softmix: use a float type to store the internal REMB bitrate

REMB's exponent is 6-bits (0..63) and has a mantissa of 18-bits. We were using
an unsigned integer to represent the bitrate. However, that type is not large
enough to hold all potential bitrate values. If the bitrate is large enough
bits were being shifted off the "front" of the mantissa, which caused the
wrong value to be sent to the browser.

This patch makes it so it now uses a float type to hold the bitrate. Using a
float allows for all bitrate values to be correctly represented.

ASTERISK-28255

Change-Id: Ice00fdd16693b16b41230664be5d9f0e465b239e
bridges/bridge_softmix.c
res/res_remb_modifier.c