FFmpeg git repo
Go to file
Dale Curtis 37e8edc9f5 avformat/mov: Fix trampling of ctts during seeks when sidx support is enabled.
When sidx box support is enabled, the code will skip reading all
trun boxes (each containing ctts entries for samples inthat box).

If seeks are attempted before all ctts values are known, the old
code would dump ctts entries into the wrong location. These are
then used to compute pts values which leads to out of order and
incorrectly timestamped packets.

This patch fixes ctts processing by always using the index returned
by av_add_index_entry() as the ctts_data index. When the index gains
new entries old values are reshuffled as appropriate.

This approach makes sense since the mov demuxer is already relying
on the mapping of AVIndex entries to samples for correct demuxing.

As a result of this all ctts entries are now 1-count. A followup
change will be submitted to remove support for > 1 count entries
which will simplify seeking.

Notes for future improvement:
Probably there are other boxes (stts, stsc, etc) that are impacted
by this issue... this patch only attempts to fix ctts since it
completely breaks packet timestamping.

This patch continues using an array for the ctts data, which is not
the most ideal given the rearrangement that needs to happen (via
memmove as new entries are read in). Ideally AVIndex and the ctts
data would be set-type structures so addition is always worst case
O(lg(n)) instead of the O(n^2) that exists now; this slowdown is
noticeable during seeks.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-24 11:02:22 +02:00
compat win32_dlfcn: Support WinRT/UWP. 2017-07-30 14:30:43 +10:00
doc libavdevice/decklink: configurablity to set max queue size 2017-08-22 22:32:29 +02:00
ffbuild build: Allow generating dependencies as a side-effect of assembling 2017-06-21 17:00:29 -03:00
libavcodec avcodec/utils: Fix signed integer overflow in rc_initial_buffer_occupancy initialization 2017-08-23 03:17:11 +02:00
libavdevice libavdevice/decklink: configurablity to set max queue size 2017-08-22 22:32:29 +02:00
libavfilter avfilter/vf_pseudocolor: add high bitdepth support 2017-08-22 12:50:24 +02:00
libavformat avformat/mov: Fix trampling of ctts during seeks when sidx support is enabled. 2017-08-24 11:02:22 +02:00
libavresample build: Generalize yasm/nasm-related variable names 2017-06-21 17:00:29 -03:00
libavutil avutil/eval: add linear interpolation helper 2017-08-19 12:42:24 +02:00
libpostproc Merge commit '92db5083077a8b0f8e1050507671b456fd155125' 2017-05-04 19:59:30 -03:00
libswresample swresample/resample: Fix flush refelction length 2017-08-16 00:54:17 +02:00
libswscale libswscale: add gray9 support 2017-08-07 13:09:41 +02:00
presets
tests avformat/mov: Fix trampling of ctts during seeks when sidx support is enabled. 2017-08-24 11:02:22 +02:00
tools build: Generalize yasm/nasm-related variable names 2017-06-21 17:00:29 -03:00
.gitattributes
.gitignore build: add support for building .cu files via nvcc 2017-05-15 11:46:50 +02:00
.travis.yml build: Prefer NASM assembler over YASM 2017-06-21 17:00:30 -03:00
Changelog avfilter: add pseudocolor filter 2017-08-19 12:42:24 +02:00
cmdutils_opencl.c cmdutils_opencl: Fix read of uinitialized cl_mem 2017-05-11 13:02:12 +02:00
cmdutils.c avformat, ffmpeg: deprecate old rotation API 2017-03-27 13:20:27 +02:00
cmdutils.h Merge commit '122de16dd8108a59a55d30543c9f28b5f61b02d1' 2017-05-05 14:04:30 +02:00
configure d3d11va: Check WINAPI_FAMILY instead of HAVE_LOADLIBRARY 2017-08-10 11:58:25 +02:00
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
ffmpeg_cuvid.c
ffmpeg_filter.c ffmpeg: Support setting the hardware device to use when filtering 2017-06-14 22:27:07 +01:00
ffmpeg_hw.c avconv_hw: Free device on initialisation failure 2017-06-18 17:07:25 +01:00
ffmpeg_opt.c ffmpeg: reindent after previous commit 2017-07-18 10:39:38 +02:00
ffmpeg_qsv.c
ffmpeg_videotoolbox.c ffmpeg_videotoolbox: fix usage of av_get_codec_tag_string() 2017-03-29 14:49:29 +02:00
ffmpeg.c ffmpeg: Fix typos in the comment for decode() ("." vs. "->") 2017-07-07 03:48:56 +02:00
ffmpeg.h dxva: add support for new dxva2 and d3d11 hwaccel APIs 2017-06-27 18:05:02 +02:00
ffplay.c ffplay: add support for more SDL pixel formats when rendering video 2017-08-10 22:08:40 +02:00
ffprobe.c ffprobe: fix use of uninitialized variable 2017-08-18 03:02:11 +02:00
ffserver_config.c
ffserver_config.h
ffserver.c Merge commit '122de16dd8108a59a55d30543c9f28b5f61b02d1' 2017-05-05 14:04:30 +02:00
INSTALL.md
LICENSE.md Merge commit '4fef648d10bf3bcfd4b8fa5755c1128966a2427c' 2017-03-15 22:07:47 +01:00
MAINTAINERS Add myself as speedhq maintainer, per request. 2017-08-03 16:36:02 -03:00
Makefile dxva: add support for new dxva2 and d3d11 hwaccel APIs 2017-06-27 18:05:02 +02:00
README.md
RELEASE Bump minor versions for master after release/3.3 branchpoint 2017-03-31 13:21:06 +02: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.