No description
Find a file
Marth64 e46e1c3368 avformat/dvdvideodec: reset the subdemuxer on discontinuity instead of flushing
DVDs naturally consist of segmented MPEG-PS blobs within a VOB
(i.e. VOBs are not linear). NAV packs set the segment boundaries.
When switching between segments, discontinuities occur and thus
the subdemuxer needs to be reset. The current approach to manage
this is by invoking ff_read_frame_flush() on the subdemuxer context,
via a callback function which is invoked during the menu or dvdnav
block functions. The same subdemuxer context is used throughout
the demux, with a stretched PTS wrap bits value (64) + disabled
overflow correction, and then flushed on each segment. Eventually,
a play_end context variable is set to declare EOF.

However, this approach causes frame drops. The block read flushes the
demuxer before the frame read is complete, causing frames to drop
on discontinuity. The play_end signal likewise ends playback before
the frame read is complete, causing frames to drop at end of the title.
To compound the issue, the PTS wrap bits value of 64 is wrong;
the VOBU limit is actually 32 and the overflow correction should work.

Instead, EOF the MPEG-PS subdemuxer organically when each VOB segment
ends, and re-open it if needed with the offset after the full frame read
is complete. In doing so, correct the PTS wrap behavior to 32 bits and
remove the play_end/segment_started signals and callback pattern.

Note that the timestamps as reported by the NAV packets are known as
"PTMs", so the fields storing the time prior to adjustment are renamed
accordingly. This makes it more clear when we are offsetting the
NAV packet reported timestamps versus what we present as a demuxer.

Signed-off-by: Marth64 <marth64@proxyid.net>
(cherry picked from commit a1ae66c827)
2025-01-07 23:43:34 -06:00
compat compat: Fix the fallback definition of stdc_trailing_zeros 2024-09-24 14:00:27 +03:00
doc avformat/dvdvideodec: enable chapter calculation for menus 2025-01-07 23:43:34 -06:00
ffbuild riscv: add Zvbb vector bit manipulation extension 2024-05-11 11:38:49 +03:00
fftools fftools/ffplay: fix crash when vk renderer is null 2024-11-06 16:50:56 +08:00
libavcodec lavc/aarch64: Fix ff_pred16x16_plane_neon_10 2025-01-07 22:39:20 +02:00
libavdevice avdevice/decklink_dec: fix leaks on error 2024-09-29 10:30:49 +02:00
libavfilter avfilter/buffersrc: check for valid sample rate 2025-01-02 15:55:37 -03:00
libavformat avformat/dvdvideodec: reset the subdemuxer on discontinuity instead of flushing 2025-01-07 23:43:34 -06:00
libavutil avutil/timecode: Avoid fps overflow in av_timecode_get_smpte_from_framenum() 2025-01-03 18:28:45 +01:00
libpostproc */version.h: bump minor versions for release/7.1 2024-09-24 17:07:30 +02:00
libswresample arm: Consistently use proper interworking function returns 2024-10-10 23:56:10 +03:00
libswscale swscale/swscale_unscaled: Fix odd height with nv24_to_yuv420p_chroma() 2025-01-03 18:28:43 +01:00
presets
tests checkasm: Print benchmarks of C-only functions 2024-12-11 12:05:23 +02:00
tools tools/target_dec_fuzzer: Adjust threshold for EACMV 2025-01-03 18:28:46 +01:00
.gitattributes lavf/assenc: normalize line endings to \n 2024-02-11 17:01:07 -08:00
.gitignore gitignore: add config_components.h 2022-03-17 18:35:41 -03:00
.mailmap mailmap: add entry for myself 2024-07-15 01:59:37 +02:00
Changelog Document stream specifier syntax change from 46cbe4ab5c 2024-11-09 02:52:57 +01:00
configure compat: add a fallback implementation of C23 stdbit.h 2024-09-23 17:08:46 +02:00
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS Use https for repository links 2023-03-01 21:59:10 +01:00
INSTALL.md INSTALL: explain the circular dependency issue and solution 2025-01-03 18:28:37 +01:00
LICENSE.md avfilter/vf_geq: Relicense to LGPL 2019-12-28 11:20:48 +01:00
MAINTAINERS MAINTAINERS: Lauri is still available but is really low on time nowadays 2025-01-03 18:28:41 +01:00
Makefile add tools/target_swr_fuzzer 2024-08-08 15:26:52 +02:00
README.md README: fix typo and description of libavfilter 2021-10-08 09:44:34 +05:30
RELEASE Update for 7.1 2024-09-29 18:47:04 +02:00
RELEASE_NOTES RELEASE_NOTES: Based on the version from 5.1 2024-09-29 18:47:04 +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 means to alter decoded audio and video through a directed graph of connected 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.