Commit Graph

87819 Commits

Author SHA1 Message Date
openvela-robot 2abdb3a8da cbs: Always check for bitstream end before reading 2026-04-20 19:37:39 +08:00
Ronald S. Bultje 48c8f371d5 vp9: fix explicit memory order for report_progress. 2026-04-20 19:37:36 +08:00
Paul B Mahol 5a7b5a5337 avfilter/af_dcshift: do not leak out frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:37:36 +08:00
Michael Niedermayer 7b8f1cdb55 avformat/mxfenc: Correct the Sample rate for PCM outside D10
Based on mail from IRT

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:36 +08:00
Michael Niedermayer 2fe884db17 avformat/mxfenc: Comment edit rate write code like the surrounding code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:36 +08:00
Michael Niedermayer 6e19c775e2 avformat/mxfenc: Replace more literal magic numbers by enum values.
This also moves the enum table up as it is needed earlier

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:36 +08:00
Ronald S. Bultje 3f273b4592 frame_thread_encoder: make 'exit' member atomic.
Should fix the following tsan warning:

WARNING: ThreadSanitizer: data race (pid=19806)
  Read of size 4 at 0x7b84000012f0 by thread T9:
    #0 worker src/libavcodec/frame_thread_encoder.c:66 (ffmpeg+0x0000007f349e)
[..]
  Previous write of size 4 at 0x7b84000012f0 by main thread (mutexes: write M1395):
    #0 ff_frame_thread_encoder_free src/libavcodec/frame_thread_encoder.c:239 (ffmpeg+0x0000007f379e)
[..]
2026-04-20 19:37:36 +08:00
Nicolas George 6baa948e51 lavfi/framesync: remove dead code.
Fix CID 1416960.
2026-04-20 19:37:36 +08:00
Nicolas George fb8b2a4d4d lavfi/framesync: reword repeatlast option help. 2026-04-20 19:37:36 +08:00
Nicolas George f838d5f1ac doc: update filter_design.txt. 2026-04-20 19:37:36 +08:00
Nicolas George f39895ee3e lavfi: rename framesync2 to framesync. 2026-04-20 19:37:36 +08:00
Nicolas George 3fb62a4b97 lavfi: remove framesync. 2026-04-20 19:37:36 +08:00
Nicolas George cd8a8a43c7 lavfi/af_sidechaincompress: use helper macros. 2026-04-20 19:37:36 +08:00
Nicolas George 3de1715f73 lavfi/af_agate: use helper macros. 2026-04-20 19:37:36 +08:00
Nicolas George a3af04c168 lavfi: add helper functions and macros for activate. 2026-04-20 19:37:36 +08:00
Michael Niedermayer bc15f02af9 avcodec/hevc_ps: Fix limit of chroma_qp_offset_list_len_minus1
A value of 5 is allowed

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:35 +08:00
Michael Niedermayer 45ec2016eb avcodec/hevc_ps: Fix c?_qp_offset_list size
Fixes: runtime error: index 5 out of bounds for type 'int8_t const[5]'
Fixes:3175/clusterfuzz-testcase-minimized-4736774054084608

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:35 +08:00
Michael Niedermayer b0d45e2d7e avcodec/shorten: Move buffer allocation and offset init to end of read_header()
They are time consuming operations, performing them after the other checks
improves the speed with damaged input dramatically.

Fixes: Timeout
Fixes: 2928/clusterfuzz-testcase-4992812120539136

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:35 +08:00
James Almer 6af56cc743 avcodec/hevc_ps: improve check for missing default display window bitstream
Fixes ticket #6644

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:37:35 +08:00
Ronald S. Bultje 411ff5cefc vp9: assert -> av_assert and fix associated compile error. 2026-04-20 19:37:35 +08:00
Luca Barbato b4e34186bf qsv: Load the hw hevc plugin by default on Linux
Only on Windows the software plugin is available.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:37:35 +08:00
Steven Liu 08f1e9fab2 MAINTAINERS: Add myself to maintainer of dashdec
Add dash maintainer.
2026-04-20 19:37:35 +08:00
Ilia Valiakhmetov d74f56dc01 Changelog: add vp9 tile threading support
Signed-off-by: Ilia Valiakhmetov <zakne0ne@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2026-04-20 19:37:35 +08:00
Ronald S. Bultje 7b9fc0e532 vp9: fix compilation with threading disabled. 2026-04-20 19:37:35 +08:00
Michael Niedermayer 28f7f75e18 avcodec/jpeg2000dsp: Fix multiple integer overflows in ict_int()
Fixes: runtime error: signed integer overflow: 22553 * -188962 cannot be represented in type 'int'
Fixes: 3042/clusterfuzz-testcase-minimized-5174210131394560

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:35 +08:00
Michael Niedermayer f180371894 avcodec/clearvideo: Only output a frame if one is coded in the packet
Fixes: Timeout (183 ms instead of about 20 sec)
Fixes: 3147/clusterfuzz-testcase-4870592182353920

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:35 +08:00
Michael Niedermayer c2264d4a95 avcodec/hevcdsp_template: Fix undefined shift in put_hevc_pel_bi_w_pixels
Fixes: runtime error: left shift of negative value -95
Fixes: 3077/clusterfuzz-testcase-minimized-4684917524922368

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:35 +08:00
Michael Niedermayer 2003b5decd avcodec/diracdec: Fix overflow in DC computation
Fixes: runtime error: signed integer overflow: 11896 + 2147483646 cannot be represented in type 'int'
Fixes: 3053/clusterfuzz-testcase-minimized-6355082062856192

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:35 +08:00
Jesse Liu a0cc5d3a3a add missing ignore files
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:35 +08:00
Michael Niedermayer 79bcb1667d avcodec/scpr: optimize shift loop.
Speeds code up from 50sec to 15sec

Fixes Timeout
Fixes: 3242/clusterfuzz-testcase-5811951672229888

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:35 +08:00
Diego Biurrun 096856f749 build: Skip generating .version files when cleaning
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:37:34 +08:00
James Almer 14c2aef6ba avfilter/vf_convolve: use av_clip_uint8
Fixes fate-source.
2026-04-20 19:37:34 +08:00
Michael Niedermayer f10128b29f avcodec/dirac_vlc: limit res_bits in APPEND_RESIDUE()
Fixes: runtime error: left shift of 1073741838 by 1 places cannot be represented in type 'int32_t' (aka 'int')
Fixes: 3279/clusterfuzz-testcase-minimized-4564805744590848

Suggested-by: <atomnuker>
Reviewed-by: <atomnuker>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:34 +08:00
Paul B Mahol 0aa3686390 avfilter: add generic FFT video convolve filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:37:34 +08:00
Jun Zhao 1af94b5939 lavc/vaapi_encode_mpeg2: fix frame rate calc error when use time_base.
fix frame rate calc error when use time_base.

Signed-off-by: Yun Zhou <yunx.z.zhou@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2026-04-20 19:37:34 +08:00
Petri Hintukainen 6d3bd0202e Add SUP/PGS subtitle muxer
Fixes ticket #2208
2026-04-20 19:37:34 +08:00
Steven Liu e9db981324 avformat/dashdec: free resource allocated by xml
modify from av_free to xmlFree

Suggested-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2026-04-20 19:37:34 +08:00
Steven Liu df5c3829fb avformat/dashdec: add dash demuxer base version
ffmpeg need a dash demuxer for demux the dash formats base on
https://github.com/samsamsam-iptvplayer/exteplayer3/blob/master/tmp/ffmpeg/patches/3.2.2/000001_add_dash_demux.patch

TODO:
1. support multi bitrate dash.

v2 fixed:
1. from autodetect to disabled
2. from camelCase code style to ffmpeg code style
3. from RepType to AVMediaType
4. fix variable typo
5. change time value from uint32_t to uint64_t
6. removed be used once API
7. change 'time(NULL)`, except it is not 2038-safe.' to av_gettime and av_timegm
8. merge complex free operation to free_fragment
9. use API from snprintf to av_asprintf

v3 fixed:
1. fix typo from --enabled-xml2 to --enable-xml2

v4 fixed:
1. from --enable-xml2 to --enable-libxml2
2. move system includes to top
3. remove nouse includes
4. rename enum name
5. add a trailing comma for the last entry enum
6. fix comment typo
7. add const to DASHContext class front
8. check sscanf if return arguments and give warning message when error
9. check validity before free seg->url and seg
10. check if the val is null, before use atoll

v5 fixed:
1. fix typo from mainifest to manifest

v6 fixed:
1. from realloc to av_realloc
2. from free to av_free

v7 fixed:
1. remove the -lxml2 from configure when require_pkg_config

v8 fixed:
1. fix replace filename template by av_asprintf secure problem

v9 modified:
1. make manifest parser clearly

v10 fixed:
1. fix function API name code style
2. remove redundant strreplace call
3. remove redundant memory operation and check return value from get_content_url()
4. add space between ) and {
5. remove no need to log the value for print

v11 fixed:
1. from atoll to strtoll
Suggested-by: Michael Niedermayer <michael@niedermayer.cc>

v12 fixed:
1. remove strreplace and instead by av_strreplace
Suggested-by: Nicolas George <george@nsup.org>

v13 fixed:
1. fix bug: cannot play:
http://dash.edgesuite.net/akamai/bbb_30fps/bbb_30fps.mpd
Reported-by: Andy Furniss <adf.lists@gmail.com>

v14 fixed:
1. fix bug: TLS connection was non-properly terminated
2. fix bug: No trailing CRLF found in HTTP header
Reported-by: Andy Furniss <adf.lists@gmail.com>

v15 fixed:
1. play youtube link: ffmpeg -i $(youtube-dl -J "https://www.youtube.com/watch?v=XmL19DOP_Ls" | jq -r ".requested_formats[0].manifest_url")
2. code refine for timeline living stream
Reported-by: Ricardo Constantino <wiiaboo@gmail.com>

v16 fixed:
1. remove the snprintf and instead by get_segment_filename make safety
2. remove unnecessary loops
3. updated xmlStrcmp and xmlFree to av_* functions
4. merge code repeat into one function
5. add memory alloc faild check
6. update update_init_section and open_url
7. output safety error message when filename template not safe
Suggested-by : wm4 <nfxjfg@googlemail.com>

v17 fixed:
1. add memory alloc faild check
2. fix resource space error at free_representation

v18 fixed:
1. add condition of template format

v19 fixed:
1. fix typo of the option describe

v20 fixed:
1. add the c->base_url alloc check
2. make the DASHTmplId same to dashenc

v21 fixed:
1. remove get_repl_pattern_and_format and get_segment_filename
2. process use dashcomm APIs

v22 fixed:
1. modify the include "dashcomm.h" to include "dash.h"
2. use internal API from dash_fill_tmpl_params to ff_dash_fill_tmpl_params

Signed-off-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: samsamsam <samsamsam@o2.pl>
2026-04-20 19:37:34 +08:00
James Almer 842498f97d avformat/matroskaenc: also write tags when output is WebM
WebM supports a subset of elements from the Tags master.
See https://www.webmproject.org/docs/container/#tagging

Reviewed-by: Ivan Janatra <janatra@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:37:34 +08:00
Clément Bœsch 1c94bff1fe build: cleanup videotoolbox
- there is no need for kCVImageBufferColorPrimaries_ITU_R_2020 checks,
  it's done at runtime
- VideoToolbox presence is now checked with check_apple_framework()
- link to CoreServices is only done when videotoolbox is enabled
2026-04-20 19:37:34 +08:00
Clément Bœsch af5064a69c build: cleanup audiotoolbox handling
*_at codecs only need the AudioToolbox framework, which is now checked
like the other Apple frameworks.
2026-04-20 19:37:34 +08:00
Clément Bœsch ed70348589 build: add --disable-coreimage autodetect switch 2026-04-20 19:37:34 +08:00
Clément Bœsch 9570b8a177 build: add --disable-avfoundation autodetect switch 2026-04-20 19:37:34 +08:00
Clément Bœsch 79259127c2 build: add check_apple_framework()
This will be used in the following commits.
2026-04-20 19:37:33 +08:00
Clément Bœsch 4fc9351bf7 lavfi/coreimage: reduce dependency scope from QuartzCore to CoreImage
What is required by the filter is CoreImage, there is no QuartzCore
usage. QuartzCore/CoreImage.h is simply an include to
CoreImage/CoreImage.h.
2026-04-20 19:37:33 +08:00
Clément Bœsch c16966d574 build: fix objcc header check
$headers is a variable set in the context of other functions (we don't
use the "local" keyword in our scripts, so those variables are global).

Currently, when checking for AVFoundation/AVFoundation.h, the actual
enabled header is math.h.

Similarly, when testing for QuartzCore/CoreImage.h, the actual enabled
header is CoreGraphics/CoreGraphics.h.

This is completely broken and may be the reason why these checks are
made in random places.
2026-04-20 19:37:33 +08:00
Clément Bœsch 6750607967 lavu/timer.h: add Linux Perf API support
Refer to "checkasm: use perf API on Linux ARM*" commit for the
rationale.

The implementation is somehow duplicated with checkasm, but so is the
current usage of AV_READ_TIME(). Until these implementations and
heuristics are made consistent, I don't see a way of sharing that code.

Note: when using libavutil/timer.h, it is now important to include
before any other include due to the _GNU_SOURCE requirement.
2026-04-20 19:37:33 +08:00
Clément Bœsch e1e001f626 lavu/tests: move timer.h include earlier
In the next commit, timer.h will require a _GNU_SOURCE to be set before
including system headers. This commit prevents compilation failures.
2026-04-20 19:37:33 +08:00
Clément Bœsch 04039c3301 lavu/tests/des: rename crypt to crypt_ref
This will prevent a symbol clash with crypt(3) after unistd.h is
included.
2026-04-20 19:37:33 +08:00
Clément Bœsch a7c4f43c3c lavu/timer.h: factor out timer report
This commit is meant to reduce the diff in the following one.
2026-04-20 19:37:33 +08:00