FFmpeg git repo
Go to file
Andreas Rheinhardt 3ab6a923d1 avformat/hlsenc: Don't segfault on uncommon names
The parsing process of the AVOpt-enabled string controlling the mapping
of input streams to variant streams is roughly as follows: Space and tab
separate variant stream group maps while the entries in each variant
stream group map are separated by ','.

The parsing process of each variant stream group proceeded as follows:
At first the number of occurences of "a:", "v:" and "s:" in each variant
stream group is calculated so that one can can allocate an array of
streams with this number of entries. Then the string is split along ','
and each substring is parsed. If such a substring starts with "a:", "s:"
or "v:" it is treated as stream specifier and (if there is a correct
number after ':') a stream of the variant stream is mapped to one of the
actual input streams.

Nothing actually guarantees that the number of streams allocated initially
equals the number of streams that are mapped to an actual input stream.
These numbers can differ if e.g. the name, the sgroup, agroup or ccgroup
of the variant stream contain "a:", "s:" or "v:".

The problem hereby is that the rest of the code presumes these numbers
to be equal and segfaults if it isn't (because the corresponding input
stream is NULL).

This commit fixes this by modifying the initial counting process to only
count occurences of "a:", "s:" or "v:" that are at the beginning or that
immediately follow a ','.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-17 22:55:18 +02:00
compat compat/avisynth: remove avisynth headers 2020-04-05 01:17:55 +02:00
doc avutil: bump version after addition of av_sat_add64 and av_sat_sub64 2020-05-17 16:05:15 -03:00
ffbuild common.mak: Also clean Windows debug files. 2020-03-21 18:46:00 +01:00
fftools fftools/ffmpeg: use local variable with same contents directly 2020-05-06 23:02:00 +08:00
libavcodec avcodec/binkaudio: Fix 2Ghz sample_rate 2020-05-17 00:43:45 +02:00
libavdevice avdevice/v4l2enc: Allow writing non-rawvideos to v4l2. 2020-05-09 15:44:43 +01:00
libavfilter avfilter/vsrc_sierpinski: unbreak configuring rate value 2020-05-16 11:13:46 +02:00
libavformat avformat/hlsenc: Don't segfault on uncommon names 2020-05-17 22:55:18 +02:00
libavresample
libavutil avutil: bump version after addition of av_sat_add64 and av_sat_sub64 2020-05-17 16:05:15 -03:00
libpostproc libavcodec, libpostproc: Remove outcommented START/STOP_TIMER 2020-03-14 18:24:04 +01:00
libswresample Silence "string-plus-int" warning shown by clang. 2020-01-06 22:38:56 +01:00
libswscale swscale: aarch64: Add a NEON implementation of interleaveBytes 2020-05-15 23:38:17 +03:00
presets
tests checkasm: swscale: Fix running the hscale test on 32 bit x86 2020-05-16 08:16:12 +03:00
tools tools/target_dec_fuzzer: Adjust threshold for PNG and APNG 2020-05-10 01:09:13 +02:00
.gitattributes
.gitignore
.mailmap mailmap: fix 3-address entries 2020-03-31 04:14:14 -05:00
.travis.yml
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
Changelog avfilter/vf_scdet: add filter to detect scene change 2020-05-14 23:03:06 +08:00
INSTALL.md
LICENSE.md
MAINTAINERS MAINTAINERS: Add myself to libopenh264enc 2020-05-06 19:12:00 +02:00
Makefile Makefile: Delete more created files when running "make distclean". 2020-03-11 11:43:01 +01:00
README.md
RELEASE
configure avfilter/vf_scdet: add filter to detect scene change 2020-05-14 23:03:06 +08:00

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.
  • 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.