Go to file
Matthieu Bouron 2e17435480 avformat/mov: adjust skip_samples according to seek timestamp
Currently skip_samples is set to start_pad if sample_time is lesser or
equal to 0. This can cause issues if the stream starts with packets that
have negative pts. Calling avformat_seek_file() with ts set to 0 on such
streams makes the mov demuxer return the right corresponding packets
(near the 0 timestamp) but set skip_samples to start_pad which is
incorrect as the audio decoder will discard the returned samples
according to skip_samples from the first packet it receives (which has
its timestamp near 0).

For example, considering the following audio stream with start_pad=1344:

 [PKT pts=-1344] [PKT pts=-320] [PKT pts=704] [PKT pts=1728] [...]

Calling avformat_seek_file() with ts=0 makes the next call to
av_read_frame() return the packet with pts=-320 and a skip samples
side data set to 1344 (start_pad). This makes the audio decoder
incorrectly discard (1344 - 320) samples.

This commit makes the move demuxer adjust skip_samples according to the
stream start_pad, seek timestamp and first sample timestamp.

The above example will now result in av_read_frame() still returning the
packet with pts=-320 but with a skip samples side data set to 320
(src_pad - (seek_timestamp - first_timestamp)). This makes the audio
decoder only discard 320 samples (from pts=-320 to pts=0).

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-01-09 17:08:27 +01:00
compat avfilter/scale_cuda: add lanczos algorithm 2020-11-04 01:43:21 +01:00
doc doc/protocols: explain tcp listen option description 2021-01-09 17:08:27 +01:00
ffbuild ffbuild: Refine MIPS handling 2020-07-23 16:30:02 +02:00
fftools Mark some pointers as const 2021-01-01 15:25:48 +01:00
libavcodec avcodec/nvenc: fix timestamp offset ticks logic 2021-01-09 16:34:59 +01:00
libavdevice lavd/decklink_dec: Do not set codec_tags. 2020-12-24 12:07:05 +01:00
libavfilter avfilter/vsrc_testsrc: Deduplicate options 2021-01-08 06:08:03 +01:00
libavformat avformat/mov: adjust skip_samples according to seek timestamp 2021-01-09 17:08:27 +01:00
libavresample
libavutil Mark some pointers as const 2021-01-01 15:25:48 +01:00
libpostproc lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bump 2021-01-01 14:14:57 +01:00
libswresample swresample/audioconvert: Fix left shift of negative value 2020-09-30 10:50:45 +02:00
libswscale lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bump 2021-01-01 14:14:57 +01:00
presets
tests fate: add tests for AVID 2021-01-01 14:33:12 +01:00
tools tools/target_dem_fuzzer.c: Decrease maxblocks 2021-01-05 02:00:05 +01:00
.gitattributes
.gitignore tools/python: add script to convert TensorFlow model (.pb) to native model (.model) 2019-07-01 10:23:47 -03:00
.mailmap mailmap: add entry for myself 2020-07-13 11:24:04 +08:00
.travis.yml Merge commit '899ee03088d55152a48830df0899887f055da1de' 2019-03-14 15:53:16 -03:00
Changelog avfilter: add temporal midway equalizer filter 2021-01-01 12:43:42 +01:00
configure configure: update copyright year 2021-01-01 00:38:22 +01:00
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
INSTALL.md
LICENSE.md avfilter/vf_geq: Relicense to LGPL 2019-12-28 11:20:48 +01:00
MAINTAINERS smvjpegdec: merge into mjpegdec 2020-12-10 10:07:09 +01:00
Makefile tools/enum_options: fix build and add to Makefile 2020-11-20 15:20:24 +01:00
README.md
RELEASE RELEASE: We are after the 4.3 branch point, update for that 2020-06-10 00:20:24 +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.
  • 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.