1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00
Go to file
Andreas Rheinhardt 3c3ad1deb0 avformat/matroskaenc: Ensure that ChapterUID are != 0
AVChapters have an int as id field and therefore this value can appear
<= 0. When remuxing from Matroska, this value actually contains
the lower 32 bits of the original ChapterUID (which can be 64 bits).

In order to ensure that the ChapterUID is always > 0, they were offset
as follows (since 07704c61): First max(0, 1LL - chapter[i].id) was computed
and stored in an uint32_t. And then the IDs were offset using this value.

This has two downsides:
1. It does not ensure that the UID is actually != 0: Namely if there is
a chapter with id == INT_MIN, then the offset will be 2^31 + 1 and a
chapter with id == INT_MAX will become 2^31 - 1 + 2^31 + 1 = 2^32 = 0,
because the actual calculation was performed in 32 bits.
2. As soon as a chapter id appears to be negative, a nontrivial offset
is used, so that not even a ChapterUID that only uses 32 bits is
preserved.

So change this by treating the id as an unsigned value internally and
only offset (by 1) if an id vanishes. The actual offsetting then has to
be performed in 64 bits in order to make sure that no UINT32_MAX wraps
around.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-13 07:59:23 +02:00
compat compat/avisynth: remove avisynth headers 2020-04-05 01:17:55 +02:00
doc doc/filters: clarify metadata and logging for blackdetect 2020-04-13 11:23:24 +05:30
ffbuild common.mak: Also clean Windows debug files. 2020-03-21 18:46:00 +01:00
fftools fftools/ffmpeg: also flush encoders which have a variable frame size 2020-04-13 00:31:24 +02:00
libavcodec avcodec/cbs: Avoid leaving the ... out in calls to variadic macros 2020-04-12 23:23:49 +02:00
libavdevice avdevice/decklink_dec: increase autodetect timeout to 3 sec 2020-04-04 22:28:05 +02:00
libavfilter doc/filters: clarify metadata and logging for blackdetect 2020-04-13 11:23:24 +05:30
libavformat avformat/matroskaenc: Ensure that ChapterUID are != 0 2020-04-13 07:59:23 +02:00
libavresample
libavutil lavu/mem: Make other alloc functions more similar to av_malloc(). 2020-04-12 22:32:03 +02:00
libpostproc
libswresample
libswscale swscale/yuv2rgb: Fix vertical dither offset with slices 2020-04-12 16:36:47 +02:00
presets
tests lavc/movtextdec: add alpha default to ass header colors 2020-04-10 09:32:13 -07:00
tools tools/target_dec_fuzzer: Adjust threshold for zerocodec 2020-04-12 16:36:47 +02:00
.gitattributes
.gitignore
.mailmap mailmap: fix 3-address entries 2020-03-31 04:14:14 -05:00
.travis.yml
Changelog Changelog: Add entry for expanded styling support in movtext 2020-04-10 09:32:13 -07:00
configure configure: add mv30 blockdsp dependency 2020-04-12 09:47:13 +10:00
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
INSTALL.md
LICENSE.md
MAINTAINERS MAINTAINERS: add my gpg fingerprint 2020-03-23 23:37:19 +01:00
Makefile
README.md
RELEASE

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.