FFmpeg git repo
Go to file
Andreas Cadhalpun 22e960ad47 golomb: always check for invalid UE golomb codes in get_ue_golomb
Also correct the check to reject log < 7, because UPDATE_CACHE only
guarantees 25 meaningful bits.

This fixes undefined behavior:
runtime error: shift exponent is negative

Testing with START/STOP timers in get_ue_golomb, one for the first
branch (A) and one for the second (B), shows that there is practically no
slowdown, e.g. for the cavs decoder:

With the check in the B branch:
    629 decicycles in get_ue_golomb B, 4194260 runs,     44 skips
    433 decicycles in get_ue_golomb A,268434102 runs,   1354 skips

Without the check:
    624 decicycles in get_ue_golomb B, 4194273 runs,     31 skips
    433 decicycles in get_ue_golomb A,268434203 runs,   1253 skips

Since the B branch is executed far less often than the A branch, this
change is negligible, even more so for the h264 decoder, where the ratio
B/A is a lot smaller.

Fixes: mozilla bug 1230239
Fixes: fbeb8b2c7c996e9b91c6b1af319d7ebc/asan_heap-oob_195450f_2743_e8856ece4579ea486670be2b236099a0.bit

Found-by: Tyson Smith
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-14 20:51:39 +01:00
compat os2threads: Add pthread_once() 2015-11-12 22:31:46 +01:00
doc doc/general: add missing @tab for ADPCM VIMA 2015-12-12 21:56:57 +01:00
libavcodec golomb: always check for invalid UE golomb codes in get_ue_golomb 2015-12-14 20:51:39 +01:00
libavdevice avdevice/dshow_enummediatypes: check return of av_malloc 2015-11-06 09:36:57 -05:00
libavfilter avfilter/vf_decimate: change ts_unit to AVRational 2015-12-14 20:37:26 +01:00
libavformat avformat/mxfenc: Do not crash if there is no packet in the first stream 2015-12-13 16:42:48 +01:00
libavresample Merge commit 'e2854e731f843906d9a9a5b882bed872341999fd' 2015-11-10 18:07:41 +01:00
libavutil avutil/softfloat: Assert that the exponent did not overflow the legal range in av_normalize1_sf() 2015-12-11 13:39:21 +01:00
libpostproc
libswresample swresample: use AV_OPT_TYPE_BOOL for linear_interp and cheby options 2015-12-04 15:43:33 +01:00
libswscale swscale/utils: replace pow by exp2 2015-12-08 22:00:05 -05:00
presets
tests fate: increase FUZZ by 1 for aac-tns-encode 2015-12-13 23:28:53 +01:00
tools patcheck: Fix false detection of 'mergeable calls' when line is removed 2015-11-23 00:34:14 +01:00
.gitattributes
.gitignore
.travis.yml Merge commit 'eda183287489b2c705843aa373a19c4e46fb2fec' 2015-11-22 17:12:24 +00:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
Changelog avfilter: add SOFAlizer audio filter 2015-12-12 20:56:36 +01:00
INSTALL.md
LICENSE.md
MAINTAINERS lavfi: remove astreamsync. 2015-11-07 16:43:36 +01:00
Makefile mips: rename mipsdspr1 to mipsdsp 2015-12-04 02:35:42 +01:00
README.md
RELEASE
arch.mak mips: rename mipsdspr1 to mipsdsp 2015-12-04 02:35:42 +01:00
cmdutils.c cosmetics: Fix weird indentations 2015-12-07 10:43:43 -08:00
cmdutils.h
cmdutils_common_opts.h
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 '9f57f134c19773d54269b6cb9ee455ff87c2e9e1' 2015-12-05 12:21:33 +01:00
configure avfilter: add SOFAlizer audio filter 2015-12-12 20:56:36 +01:00
ffmpeg.c ffmpeg: change command line option -dump to work without -loglevel debug 2015-12-11 13:39:21 +01:00
ffmpeg.h ffmpeg: Add basic support to mux multiple programs 2015-12-11 22:27:25 +01:00
ffmpeg_dxva2.c ffmpeg_dxva2: support vp9 hwaccel 2015-12-07 09:47:51 +01:00
ffmpeg_filter.c ffmpeg_filter: remove redundant null ptr check 2015-11-11 01:51:52 +01:00
ffmpeg_opt.c ffmpeg: Add basic support to mux multiple programs 2015-12-11 22:27:25 +01:00
ffmpeg_qsv.c
ffmpeg_vdpau.c
ffmpeg_videotoolbox.c
ffplay.c ffplay: use hypot() 2015-12-06 08:11:47 -05:00
ffprobe.c ffprobe: Do not print profile names in -bitexact 2015-12-06 14:37:40 +01:00
ffserver.c ffserver: Clear avio context after closing it in rtp_new_av_stream() 2015-11-30 23:31:12 +01:00
ffserver_config.c
ffserver_config.h
library.mak
version.sh

README.md

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. Few developers follow pull requests so they will likely be ignored.