No description
Find a file
Andreas Rheinhardt 65f24edb05 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 <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3ab488a540)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-03 16:17:40 +02:00
compat compat/cuda: convert to unix line endings 2016-09-23 11:43:00 +02:00
doc Update for 3.2.15 2020-07-01 13:10:34 +02:00
libavcodec avcodec/ttaenc: Fix undefined shift 2020-07-03 16:17:40 +02:00
libavdevice avdevice/iec61883: free the private context at the end 2018-04-18 23:01:33 -03:00
libavfilter avfilter/vf_xbr: Fix left shift of negative number 2020-07-03 16:17:40 +02:00
libavformat avformat/movenc: Fix undefined shift 2020-07-03 16:16:48 +02:00
libavresample Revert "Bump minor versions after 3.2 branchpoint to seperate release" 2016-10-26 21:22:12 +02:00
libavutil avutil/common: Fix integer overflow in av_ceil_log2_c() 2020-07-01 12:49:26 +02:00
libpostproc postproc/postprocess_template: remove FF_REG_sp from clobber list 2019-01-15 00:57:27 +01:00
libswresample swresample/swresample: Fix input channel count in resample_first computation 2018-11-18 02:20:43 +01:00
libswscale swscale/utils: Fix invalid left shifts of negative numbers 2020-07-03 16:17:40 +02:00
presets presets: remove moldering iPod presets 2014-06-17 16:15:04 -08:00
tests avcodec/vp56rac: delay signaling an error on truncated input 2020-07-01 12:49:26 +02:00
tools zmqsend: Initialize ret to 0 2016-12-06 00:07:50 +01:00
.gitattributes Treat all '*.pnm' files as non-text file 2014-11-28 17:52:43 -05:00
.gitignore Merge commit '6641819fee' 2016-06-26 15:43:05 +02:00
.travis.yml Merge commit 'eda1832874' 2015-11-22 17:12:24 +00:00
arch.mak mips: rename mipsdspr1 to mipsdsp 2015-12-04 02:35:42 +01:00
Changelog Changelog: update 2020-07-02 18:50:40 +02:00
cmdutils.c cmdutils: fix typos 2016-10-09 20:09:00 +02:00
cmdutils.h cmdutils: fix typos 2016-10-09 20:09:00 +02:00
cmdutils_common_opts.h opts: add list device sources/sinks options 2014-10-25 20:20:31 +02:00
cmdutils_opencl.c all: use FFDIFFSIGN to resolve possible undefined behavior in comparators 2015-11-03 16:28:30 -05:00
common.mak Merge commit 'c5fd4b5061' 2016-06-27 19:39:46 +02:00
configure configure: bump year 2020-07-01 12:49:26 +02:00
CONTRIBUTING.md Add CONTRIBUTING.md 2016-09-18 10:02:13 +01:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS CREDITS: redirect to Git log, remove current outdated content 2013-01-31 18:02:52 +01:00
ffmpeg.c fftools/ffmpeg: Free swresample dictionary during cleanup 2020-07-03 16:17:40 +02:00
ffmpeg.h Merge commit '398f015f07' 2016-10-08 11:38:47 +02:00
ffmpeg_cuvid.c doc: fix spelling errors 2016-10-21 23:58:47 +02:00
ffmpeg_dxva2.c Merge commit '18c506e9e6' 2016-06-26 15:34:01 +02:00
ffmpeg_filter.c ffmpeg: switch to codecpar 2016-09-21 15:39:28 +02:00
ffmpeg_opt.c fftools/ffmpeg_opt: Fix signed integer overflow 2020-07-03 16:16:48 +02:00
ffmpeg_qsv.c ffmpeg/qsv: fix QSV-accelerated transcode performance drop issue. 2016-08-16 17:09:33 +02:00
ffmpeg_vaapi.c ffmpeg_vaapi: fix choice of decoder_format 2016-09-29 01:23:52 +02:00
ffmpeg_vdpau.c Merge commit 'f72db3f2f3' 2016-06-26 15:29:39 +02:00
ffmpeg_videotoolbox.c ffmpeg/videotoolbox: protect UTGetOSTypeFromString on both VDA and VT 2015-10-15 10:22:31 +02:00
ffplay.c ffplay: fix sws_scale possible out of bounds array access 2016-12-10 23:24:05 +01:00
ffprobe.c ffprobe: Fix NULL pointer handling in color parameter printing 2017-09-17 12:21:32 +02:00
ffserver.c ffserver: Check chunk size 2016-12-06 00:07:50 +01:00
ffserver_config.c ffserver_config: Setup codecpar in add_codec() 2017-02-07 13:21:14 +01:00
ffserver_config.h ffserver: Use singlejpeg muxer for jpeg 2015-06-08 03:36:22 +02:00
INSTALL.md INSTALL: add markdown syntax 2014-05-28 22:38:38 +02:00
library.mak Merge commit 'c5fd4b5061' 2016-06-27 19:39:46 +02:00
LICENSE.md lavc: remove libfaac wrapper 2016-10-01 19:58:04 +01:00
MAINTAINERS MAINTAINERS: add myself for audiotoolbox 2016-10-24 01:47:52 -05:00
Makefile Merge commit '6641819fee' 2016-06-26 15:43:05 +02:00
README.md Add CONTRIBUTING.md 2016-09-18 10:02:13 +01:00
RELEASE Update for 3.2.15 2020-07-01 13:10:34 +02:00
RELEASE_NOTES RELEASE_NOTES: based on 3.1 2016-10-26 21:14:02 +02:00
version.sh version.sh: Fix spurious rebuilds. 2016-03-10 09:53:10 +01:00

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides a mean to alter decoded Audio and Video through chain of filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • ffserver is a multimedia streaming server for live broadcasts.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

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.