1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00
Commit Graph

119940 Commits

Author SHA1 Message Date
693703bcdb avformat/dvdvideodec: remove unused has_cc field
Signed-off-by: Marth64 <marth64@proxyid.net>
2025-06-15 12:22:17 -05:00
f66ae1ba24 avformat/dump: lowercase 'Start' prefix for start offset
Just applying some UX polish.
This is to match the lowercase trend of attributes in
the dump string (and similar to chapters).

Signed-off-by: Marth64 <marth64@proxyid.net>
2025-06-15 12:22:10 -05:00
90424a4475 various: fix typos
usefull -> useful
seperately -> separately
reciever -> receiver

Signed-off-by: Clément Péron <peron.clem@gmail.com>
2025-06-15 21:00:38 +05:30
52441bd4cd avformat/rtpdec: explicit timestamp wraparound handling
Change delta_timestamp to int32_t and add explicit cast to handle
RTP timestamp wraparound correctly. This fixes implementation-defined
behavior when computing negative timestamp differences due to 32-bit
wraparound.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-06-14 23:41:38 +02:00
3f1f9db7f5 avfilter/vf_mcdeint: add yuv444p support to mcdeint
Signed-off-by: Ethan Halsall <ethanhalsall11@augustana.edu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-06-14 23:41:38 +02:00
fb65ecbc9b avutil: Fix linking x86 asm constants with Clang in MSVC mode
This fixes building with Clang in MSVC mode, for x86, which was
broken in 6e49b86996 (in Nov 2024);
previously it failed with undefined symbols for the constants
defined with DECLARE_ASM_CONST, accessed via inline assembly.

Before 57861911a3, there was an
    #elif defined(__GNUC__) || defined(__clang__)
case before the
    #elif defined(_MSC_VER)
case for defining DECLARE_ASM_CONST, which included av_used.
(This case included the explicit "defined(__clang__)" since
f637046d3134a331e4b5a7243ac3dfb92735b8a5.)

After 57861911a3, it used the
generic definition of DECLARE_ASM_CONST that also included
av_used - which also worked for Clang in MSVC mode. But after
6e49b86996, Clang in MSVC mode
ended up using the MSVC specific variant which lacked the
av_used declaration, causing linker errors due to undefined
symbols.

Signed-off-by: Martin Storsjö <martin@martin.st>
2025-06-13 11:36:20 +03:00
58f3d8a461 avutil/hwcontext_videotoolbox: fix color primaries check
Fix incorrect enum value used in color primaries check by replacing
AVCOL_SPC_UNSPECIFIED with AVCOL_PRI_UNSPECIFIED.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2025-06-13 08:41:53 +08:00
f3bf535696 avcodec/libx264: Remove unnecessary include
eval is for av_strtod, which wasn't been used by libx264 now.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-06-12 23:07:13 +08:00
9ad6dca28c avcodec/vvc: parse all SEI messages
While the current code iterated over the messages, it always returned
in the first iteration. Instead keep iterating and warn for failure to
parse. At time of writing, none of the parsing functions seems to
actually return an error, ever.

Fix CID 1648348
2025-06-12 21:17:07 +08:00
3d7668dae1 avcodec/vvc/dec: fix possible null-pointer dereference
When checking for filmgrain here, needs_fg can be true even when
film_grain_characteristics is NULL (when aom_film_grain.enable is true),
therefore this check could end up dereferencing film_grain_characteristics
even though it is NULL.

Fix CID 1648347
2025-06-12 21:16:46 +08:00
26807592e1 avformat/internal: add missing __clang__ check
Clang x86_64-pc-windows-msvc doesn't define __GNUC__.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2025-06-12 14:17:38 +03:00
43dc443446 avutil/intmath: use AV_HAS_BUILTIN to detect builtin availability
Fixes use of bultins on clang x86_64-pc-windows-msvc which does not
define any __GNUC__. Also on other targets __GNUC__ is defined to 4 by
default, so any feature testing based on version is not really valid.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2025-06-12 14:17:37 +03:00
f019dd69f0 ffmpeg_demux: init resume_warn variable
Fixes an uninitialized read introduced with
6232f416b1

Fix CID 1643162 Uninitialized scalar variable
2025-06-11 19:32:05 +02:00
089e69dfe4 lavfi/f_sendcmd: clear Command on alloc failure
If the command array failed to allocate, the current parsed
Command has to be cleared, else memory allocated for it
would be leaked.

Fix CID 1638635
2025-06-11 19:26:22 +02:00
2c3ac6e0fa lavfi/f_sendcmd: add helper to clear Command
Makes clearing the Command more explicit and
consistent.
2025-06-11 19:26:22 +02:00
93255f1c48 avformat/sdp: add framerate entry
This also updates fate-lavf-mov_rtphint as there the SDP
is included in the muxed file.
2025-06-11 19:19:50 +02:00
e8199f95d6 avformat/rtpdec_jpeg: Set width and heigh codec parameters
Signed-off-by: Marvin Scholz <epirat07@gmail.com>
2025-06-11 19:19:50 +02:00
c917f28c49 avformat/rtsp: parse framerate in sdp
Co-authored-by: Marvin Scholz <epirat07@gmail.com>
Signed-off-by: Marvin Scholz <epirat07@gmail.com>
2025-06-11 19:19:50 +02:00
2dcd9c5aac doc: use av_dict_iterate in documentation example 2025-06-11 19:19:50 +02:00
922a1ca989 vulkan: maintain compatibility with older headers 2025-06-12 00:17:29 +09:00
3ac7d70291 hwcontext_vulkan: fix image copy
The patch was applied by mistake in an unfinished form.
This fixes the build and lets the code run.
2025-06-11 14:33:01 +09:00
9e93163268 vulkan/ffv1dec: fix FFVkSPIRVCompiler leak 2025-06-11 13:30:07 +09:00
f604d1093f vulkan/ffv1dec: fix leak in FFVulkanDecodeShared 2025-06-11 13:30:07 +09:00
ba52d7802e vulkan: fix leak in FFVkExecPool 2025-06-11 13:30:07 +09:00
a9b2c10eee hwcontext_vulkan: use host image copy 2025-06-11 01:20:18 +09:00
f531c91170 hwcontext_vulkan: add a setting to limit queues
If its a problem, you'll likely want to set it to 1 than more fine-grained
control, which you can already do via the API.
2025-06-10 22:26:14 +09:00
26d17709e7 hwcontext_vulkan: minimize queue allocation on NVIDIA
On NVIDIA, there's a global maximum limit of approximately 112 queues,
which means it takes ONLY 7 total programs using the maximum amount of
queues to cause the driver to error out/*segfault* during initialization.

Also, each queue takes about 30ms to allocate, which quickly adds up.

This reduces the queues allocate to the minimum that we would be happy
with. Its not worth limiting decode/encode queues as they're generally
not a lot, and do help.
2025-06-10 22:26:14 +09:00
b5262bccdb hwcontext_vulkan: do not use optical flow queueus by default
We don't use them, and on NVIDIA, each queue takes around 30ms
to allocate, and the driver has a global limit of ONLY 112 queues.
2025-06-10 22:26:09 +09:00
5fea5e3e11 configure: rename POSIX ioctl check
Commit 00b64fca55 introduced configure
detection for HAVE_POSIX_IOCTL but unfortunately this conflicts with
v4l-utils version 1.30, which itself checks for #ifdef HAVE_POSIX_IOCTL
in a public header and erroneously determines it to be true because we
define this to be 0.

Since this is only used for avdevice/v4l2, we rename this to something
else, namely ioctl_posix, simply to prevent the name conflict with the
file /usr/include/libv4l2.h at least until they can upstream a fix on
their end.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-06-08 19:42:56 -04:00
ebcf2dcb2c avformat/movenc: handle EAC-3 extension bits for Atmos
Based on a patch by nyanmisaka.
Fixes commit #9996.

Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2025-06-08 18:39:35 -03:00
117343c0ba avcodec/ac3_parser: handle more header bits in ff_ac3_parse_header()
Based on a patch by nyanmisaka.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-06-08 18:39:17 -03:00
efbcd31206 avcodec/ac3_parser: use a padded buffer in av_ac3_parse_header()
The GetBitContext API requires the buffer to be padded, and the documentation for
av_ac3_parse_header() does not specify it, so use a temporary local buffer.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-06-08 18:36:09 -03:00
49e52ca24f avcodec/d3d12va_encode: fix l0 reference count limit
Prevents potential null pointer dereference when querying
MaxL1ReferencesForB from codec-specific support structures
during GOP structure initialization.

Signed-off-by: Tong Wu <wutong1208@outlook.com>
2025-06-08 21:24:25 +08:00
be46370941 avformat/dhav: Add missed free for end_buffer
Accidentally left out of 36ec9217e6.

Found-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2025-06-08 12:58:22 +01:00
b7fc195e7a avutil/x86/intmath: remove inline asm implementations for clip functions
GCC/Clang is smart enough to emit minss/maxss the same way as these functions.
The only theoretical benefit was in x86_32, where x87 floats are used, but the
penalty of making the clipping opaque to the compiler's scheduler plus moving
values from mmx regs to xmm and back will offset any potential speedup.
x86_32 builds targetting anything made in the last two decades and a half
should use -msse -mfp=sse anyway.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-06-07 21:14:55 -03:00
8a9cbf99a5 libavformat/rtpdec: Fix RTP timestamp wraparound in Producer Reference Time
The rtp_set_prft() function incorrectly calculates the timestamp delta
when RTP timestamps wrap around the 32-bit boundary. The current code:

    delta_timestamp = (int64_t)timestamp - (int64_t)s->last_rtcp_timestamp;

treats both timestamps as large positive values, causing wraparound to
produce a large negative delta instead of the correct small positive delta.

For example, with a 90kHz video clock:
- last_rtcp_timestamp = 0xFFFFFF00 (near wraparound)
- timestamp = 0x00000100 (after wraparound)
- Current result: delta ≈ -4.3 billion ticks ≈ -47,721 seconds
- Expected result: delta ≈ +512 ticks ≈ +0.006 seconds

This causes prft->wallclock to jump backward by approximately:
- 90kHz video: ~47,721 seconds (~13.25 hours)
- 48kHz audio: ~89,478 seconds (~24.9 hours)
- 8kHz audio: ~536,871 seconds (~6.2 days)

Fix by casting the subtraction result to int32_t, which correctly
handles wraparound through modular arithmetic:

    delta_timestamp = (int32_t)(timestamp - s->last_rtcp_timestamp);

This ensures the delta is always in the range [-2^31, 2^31-1], making
wraparound produce the correct small positive values.

Fixes timing jumps in applications that rely on Producer Reference Time
for media synchronization.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-06-08 02:07:23 +02:00
869e288b3a avformat/framecrcenc: List types and checksums for for side data
This allows detecting changes and regressions in side data related code, same as what
framecrc does for before already for packet data itself.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-06-07 20:00:12 +02:00
21fd1b5ba5 avformat/dhav: Do not evaluate avio_size() multiple times
Code like FFMIN(MAX_DURATION_BUFFER_SIZE, avio_size(s->pb)) is not safe
as FFMIN() is a macro and avio_size() is thus evaluated multiple
times

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-06-07 19:36:49 +02:00
4611ed5cc3 avformat/tls_openssl: fix build error when openssl version < 3
add the missing data structure pkey in the tls_context
properly set this pkey and free it

Signed-off-by: Jack Lau <jacklau1222@qq.com>
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-06-07 14:36:58 +02:00
d811966ba6 tools/target_dem_fuzzer: remove unused fuzz_tag
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-06-07 14:33:27 +02:00
dc9794d340 tools/target_dem_fuzzer: make fuzz data pointer constant
Mostly to avoid warnings.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-06-07 14:33:26 +02:00
ccfea9696f tools/target_dec_fuzzer: suppress Wunused-function
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-06-07 14:33:26 +02:00
0c12265b05 MAINTAINERS: Add myself for graph printing
..and resources

Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-06-07 14:32:25 +02:00
81370fd796 lavc/vvc: Fix unchecked return code and shadowing
Signed-off-by: Frank Plowman <post@frankplowman.com>
2025-06-07 19:26:11 +08:00
1998879868 MAINTAINERS: Add myself as vvc maintainer
My OpenPGP key is available at

https://keys.openpgp.org/vks/v1/by-fingerprint/34E248D6B7DF476970C7330403A84C6A098F2C6B

and

https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x34e248d6b7df476970c7330403a84c6a098f2c6b
Signed-off-by: Frank Plowman <post@frankplowman.com>
2025-06-07 19:20:12 +08:00
a0118d6d07 MAINTAINERS: add myself as vvc maintainer
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-06-07 19:20:12 +08:00
a5dc56fcd6 avformat/format: make experimental flag works for muxer
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-06-07 15:59:06 +08:00
153cdf3142 avformat/whip: Constify arguments in is_rtp_rtcp/is_rtcp
Fix warning of -Wincompatible-pointer-types-discards-qualifiers.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-06-07 15:58:21 +08:00
1af6881ba1 avformat/tls: Fix integer overflow with option mtu
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-06-07 15:58:21 +08:00
d9797544b4 avcodec/sanm: codec31/32 support
codec31/32 are similar to codec1/3 (RLE coding) but with two 4-bit pixels
per byte; they are only used in the Sega-CD release of Rebel Assault 1.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
2025-06-06 22:07:15 +02:00