No description
Find a file
Zhao Zhili 2fca8e400e avcodec/videotoolboxenc: Fix concurrent access to CVPixelBufferRef
For a frame comes from AV_HWDEVICE_TYPE_VIDEOTOOLBOX, it's
CVPixelBufferRef is maintained by a pool. CVPixelBufferRef returned
to the pool when frame buffer reference reached to zero. However,
VTCompressionSessionEncodeFrame also hold a reference to the
CVPixelBufferRef. So a new frame get from av_hwframe_get_buffer
may access a CVPixelBufferRef which still used by the encoder.
It's only after vtenc_output_callback that we can make sure
CVPixelBufferRef has been released by the encoder.

The issue can be tested with sample from trac #10884.
ffmpeg -hwaccel videotoolbox \
	-hwaccel_output_format videotoolbox_vld \
        -i input.mp4 \
	-c:v hevc_videotoolbox \
	-profile:v main \
        -b:v 3M \
        -vf scale_vt=w=iw/2:h=ih/2:color_matrix=bt709:color_primaries=bt709:color_transfer=bt709 \
        -c:a copy \
	-tag:v hvc1 \
	output.mp4

Withtout the patch, there are some out of order images in output.mp4.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-07-16 19:53:53 +08:00
compat avutil/common: Don't auto-include mem.h 2024-03-31 00:08:43 +01:00
doc doc/examples/mux: remove nop 2024-07-12 16:40:51 +02:00
ffbuild riscv: add Zvbb vector bit manipulation extension 2024-05-11 11:38:49 +03:00
fftools ffmpeg: don't truncate getmaxrss value 2024-07-15 15:15:55 +05:30
libavcodec avcodec/videotoolboxenc: Fix concurrent access to CVPixelBufferRef 2024-07-16 19:53:53 +08:00
libavdevice avdevice/dshow_capture: Fix error handling in ff_dshow_##prefix##_Create() 2024-07-15 01:59:40 +02:00
libavfilter avfilter: Free out on error 2024-07-15 01:59:41 +02:00
libavformat avformat/dvdvideodec: Fix incorrect padding cell trim logic 2024-07-13 17:17:36 +02:00
libavutil avutil/hwcontext_videotoolbox: Fix build with older SDKs 2024-07-16 19:51:45 +08:00
libpostproc avutil/common: Don't auto-include mem.h 2024-03-31 00:08:43 +01:00
libswresample swresample/swresample: Rectify invalid function in the documentation 2024-07-02 21:57:17 +02:00
libswscale swscale/utils: fix leak on threaded ctx init failure 2024-07-14 13:48:59 +02:00
presets presets: remove moldering iPod presets 2014-06-17 16:15:04 -08:00
tests fate/lavf-container: add a test for L-HEVC remuxing 2024-07-15 18:19:00 -03:00
tools tools/target_enc_fuzzer: A64MULTI5 encoder is very slow, check and adjust threshold 2024-07-12 22:44:19 +02: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 Changelog: mention cropping support in Matroska and MP4 2024-07-11 21:35:40 -03:00
configure x86/intreadwrite: add missing casts to pointer arguments 2024-07-11 18:24:26 -03:00
CONTRIBUTING.md Add CONTRIBUTING.md 2016-09-18 10:02:13 +01:00
COPYING.GPLv2
COPYING.GPLv3 Add configure option to upgrade (L)GPL to version 3. 2009-06-05 11:04:03 +00:00
COPYING.LGPLv2.1 cosmetics: Delete empty lines at end of file. 2012-02-09 12:26:45 +01:00
COPYING.LGPLv3 Add configure option to upgrade (L)GPL to version 3. 2009-06-05 11:04:03 +00:00
CREDITS Use https for repository links 2023-03-01 21:59:10 +01:00
INSTALL.md INSTALL.md: Fix Markdown formatting 2019-01-31 10:29:16 -09:00
LICENSE.md avfilter/vf_geq: Relicense to LGPL 2019-12-28 11:20:48 +01:00
MAINTAINERS MAINTAINERS: add myself as d3d12va_encode maintainer 2024-07-10 18:10:08 +02:00
Makefile riscv: add Zvbb vector bit manipulation extension 2024-05-11 11:38:49 +03:00
README.md README: fix typo and description of libavfilter 2021-10-08 09:44:34 +05:30
RELEASE RELEASE: update after 7.0 branch 2024-04-02 13:02:39 -03: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.