]> git.sesse.net Git - ffmpeg/commit
avutil/video_enc_params: Combine overflow checks
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 14 Feb 2021 18:43:56 +0000 (19:43 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 19 Feb 2021 06:45:39 +0000 (07:45 +0100)
commit39df279c741928c6adf223890ff19b457f96b9bf
treedc14860c289c401572c7d26f191a99dd2d36190d
parent1a555d3c604804dcedacd230d410cfc822da3f4c
avutil/video_enc_params: Combine overflow checks

This patch also fixes a -Wtautological-constant-out-of-range-compare
warning from Clang and a -Wtype-limits warning from GCC on systems
where size_t is 64bits and unsigned 32bits. The reason for this seems
to be that variable (whose value derives from sizeof() and can therefore
be known at compile-time) is used instead of using sizeof() directly in
the comparison.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavutil/video_enc_params.c