|author||Andreas Rheinhardt <firstname.lastname@example.org>||Sun Sep 15 22:01:20 2019 +0200|
|committer||Andreas Rheinhardt <email@example.com>||Fri Jul 03 16:17:40 2020 +0200|
avcodec/ttaenc: Fix undefined shift ttaenc contained (1 << unary) - 1 as an argument for a function expecting an unsigned int. unary can be as big as 31 in this case. The type of the shift and the whole expression is int, because 1 fits into an integer, so that the behaviour is undefined if unary == 31 as the result of the shift can't be represented in an int §. Subtraction by 1 (which makes the result of the whole expression representable in an int) doesn't change that this is undefined (it usually leads to signed integer overflow which is undefined, too). The solution is simple: Make 1 unsigned to change the type of the whole expression to unsigned int (as the function expects anyway). Fixes ticket #8153. §: This of course presupposes the common int range of -2^31..2^31-1 Signed-off-by: Andreas Rheinhardt <firstname.lastname@example.org> Reviewed-by: Paul B Mahol <email@example.com> Signed-off-by: Michael Niedermayer <firstname.lastname@example.org> (cherry picked from commit 3ab488a5407f833ecc66e8fa4c537dc4852db720) Signed-off-by: Andreas Rheinhardt <email@example.com>
FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.
libavcodecprovides implementation of a wider range of codecs.
libavformatimplements streaming protocols, container formats and basic I/O access.
libavutilincludes hashers, decompressors and miscellaneous utility functions.
libavfilterprovides a mean to alter decoded Audio and Video through chain of filters.
libavdeviceprovides an abstraction to access capture and playback devices.
libswresampleimplements audio mixing and resampling routines.
libswscaleimplements color conversion and scaling routines.
The offline documentation is available in the doc/ directory.
Coding examples are available in the doc/examples directory.
FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.
Patches should be submitted to the ffmpeg-devel mailing list using
git format-patch or
git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.