File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -1304,14 +1304,11 @@ static bool audio_bit_rate_invalid(uint32_t bit_rate)
13041304
13051305static bool video_bit_rate_invalid (uint32_t bit_rate )
13061306{
1307- /* https://www.webmproject.org/docs/webm-sdk/structvpx__codec__enc__cfg.html shows the following:
1308- * unsigned int rc_target_bitrate
1309- * the range of uint varies from platform to platform
1310- * though, uint32_t should be large enough to store bitrates,
1311- * we may want to prevent from passing overflowed bitrates to libvpx
1312- * more in detail, it's the case where bit_rate is larger than uint, but smaller than uint32_t
1307+ /* Cap the target rate to 1000 Mbps to avoid some integer overflows in
1308+ * target bandwidth calculations.
1309+ * https://github.com/webmproject/libvpx/blob/027bbee30a0103b99d86327b48d29567fed11688/vp8/vp8_cx_iface.c#L350-L352
13131310 */
1314- return bit_rate > UINT32_MAX ;
1311+ return bit_rate > 1000000 ;
13151312}
13161313
13171314static bool invoke_call_state_callback (ToxAV * av , uint32_t friend_number , uint32_t state )
You can’t perform that action at this time.
0 commit comments