1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00
Commit Graph

117695 Commits

Author SHA1 Message Date
Alexander Strasser
b0ea76c9d1 lavc/dnxuc_parser: Use av_fourcc2str instead of av_fourcc_make_string
The documentation of av_fourcc_make_string states the passed in
buffer must be of at least the size of AV_FOURCC_MAX_STRING_SIZE .

Using av_fourcc2str uses the correct buffer size and moves the
buffer into a nested scope while also being shorter.

Fixes: CID 1632380
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2024-10-13 22:57:51 +02:00
Marth64
f46415f373 avformat/hlsenc: check return value of avcodec_parameters_copy()
Written in the dominant style of the surrounding code block.

Signed-off-by: Marth64 <marth64@proxyid.net>
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2024-10-13 23:04:20 +08:00
Marth64
95bb47de7d avformat/dashdec: format open_demux_for_component()
Signed-off-by: Marth64 <marth64@proxyid.net>
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2024-10-13 23:03:21 +08:00
Marth64
7acc2ebd5d avformat/dashdec: check return code of avcodec_parameters_copy()
Signed-off-by: Marth64 <marth64@proxyid.net>
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2024-10-13 23:03:19 +08:00
Marth64
6ee7555a90 avformat/dashdec: return ret directly in open_demux_for_component()
Signed-off-by: Marth64 <marth64@proxyid.net>
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2024-10-13 23:03:15 +08:00
Jonathan Baecker
e6e9cb3ce7 libavformat/hlsplaylist: add subtitle_varname for naming subtitle streams
If 'sname:*' is set in the var_stream_map variable, use it as
the NAME attribute for subtitles. This improves the naming of
subtitle streams in HTML players, providing clearer and more
descriptive labels for users.

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2024-10-13 23:01:59 +08:00
Jonathan Baecker
c7cf0df494 avformat/hlsenc: Respect omit_endlist flag in subtitle playlists
Ensure that when the `-hls_flags omit_endlist` option is set,
the `#EXT-X-ENDLIST` tag is also omitted from the `stream_vtt.m3u8`
subtitle playlist. This maintains consistency with the behavior
in other playlists when `omit_endlist` is specified.

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2024-10-13 23:01:03 +08:00
Jonathan Baecker
425c323420 avformat/hlsenc: Respect append_list flag in subtitle
Ensure that when the `-hls_flags append_list` option is set,
that *.vtt files in stream_vtt.m3u8 are correctly updated.
This fixes https://trac.ffmpeg.org/ticket/11208

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2024-10-13 22:59:22 +08:00
Nicolas Gaullier
de976eaf30 avfilter/framesync: fix forward EOF pts
Note1: when the EOF pts is not accurate enough, the last frame
can be dropped by vf_fps with default rounding.

Note2: vf_scale use framesync since e82a3997cd,
so this is a very commonplace scenario.

For example:
./ffprobe -f lavfi testsrc=d=1,scale,fps -of flat \
  -count_frames -show_entries stream=nb_read_frames

Before:
streams.stream.0.nb_read_frames="24"

After:
streams.stream.0.nb_read_frames="25"

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-10-13 13:54:03 +02:00
asivery
31a63e4e01 avformat/oma: Demux oma-encapsulated AAC audio
Signed-off-by: asivery <asivery@protonmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-10-13 13:43:39 +02:00
Thomas Guillory
37863b92b7 libavfilter/vf_overlay: fix the displayed flags in CLI documentation
When displaying help for overlay filter in CLI, the flags for x and y
parameters don't have the T flag. However these two parameters do have
the capability to be set at runtime, as implemented in commit
d2752ef061. This commit fixes the CLI documentation.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-10-13 13:43:06 +02:00
vipyne
f5403e5f1e configure: suggest installing nasm before using --disable-x86asm
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-10-13 13:28:49 +02:00
Marvin Scholz
7e1d72589e avfilter/af_afftdn: use av_assert0 for unreachable assert
This is unreachable anyway so performance is not an issue here. Allows
guiding the compiler in all build modes to not emit a spurious warning
here:

  warning: variable 'mag' is used uninitialized whenever switch default is taken
2024-10-13 02:15:31 +02:00
James Almer
02306cbfee avcodec: deprecate v410 de/encoder
The V30X pixel format was recently added, so this lavc workaround is no longer
needed.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 11:21:14 -03:00
James Almer
3c64d614c7 avcodec: deprecate v308 de/encoder
The vyu444 pixel format was recently added, so this lavc workaround is no longer
needed.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 11:21:14 -03:00
James Almer
e2427a4223 avcodec: deprecate v408 de/encoder
The uyva pixel format was recently added, so this lavc workaround is no longer
needed.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 11:21:14 -03:00
James Almer
c5cf98d77e avformat/movenc: add support for V30X pixel format
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 11:21:14 -03:00
James Almer
12fc358249 avformat/movenc: add support for VYU444 pixel format
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 11:21:14 -03:00
James Almer
d6b08e0c0f avformat/movenc: add support for UYVA pixel format
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 11:21:14 -03:00
James Almer
de923595fd avcodec/videotoolbox: choose AYUV pixel format when ideal
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 11:21:14 -03:00
James Almer
d41e5b0fc7 avutil/hwcontext_videotoolbox: add support for AYUV pixel format
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 11:21:14 -03:00
James Almer
8b208362ae avformat/riff: map v410 fourcc to RAWVIDEO decoder
There's no need to keep using a custom decoder for this pixel format.
md5 values change because the nut container now reports rawvideo as encoder.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 11:21:10 -03:00
James Almer
f6878a9b09 avformat/riff: map v308 fourcc to RAWVIDEO decoder
There's no need to keep using a custom decoder for this pixel format.
md5 values change because the nut container now reports rawvideo as encoder.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 11:21:06 -03:00
James Almer
b9653e3d3c avformat/riff: map v408 fourcc to RAWVIDEO decoder
There's no need to keep using a custom decoder for this pixel format.
md5 values change because the nut container now reports rawvideo as encoder.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 11:20:58 -03:00
James Almer
1f9a44a7fc avformat/riff: map y408 fourcc to RAWVIDEO decoder
md5 values change because the nut container now reports rawvideo as encoder.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 11:20:22 -03:00
James Almer
cd04ebe033 swscale/output: add V30X output support
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 10:08:29 -03:00
James Almer
57db8e0571 swscale/output: add VYU444 output support
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 10:08:29 -03:00
James Almer
eac9af382a swscale/output: add UYVA output support
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 10:08:29 -03:00
James Almer
6cd52c1080 swscale/output: add AYUV output support
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 10:06:09 -03:00
James Almer
5f1bf3cd65 swscale/output: add missing yuv2packed1 and yuv2packed2 support for VUY{X,A}
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 09:56:23 -03:00
Rémi Denis-Courmont
1eb026dd8b riscv/vvc: fix UNDEF whilst initialising DSP
The current triggers an illegal instruction if the CPU does not support
vectors.
2024-10-12 09:23:33 +03:00
Ingo Brückl
5557c673ea avcodec/vaapi_encode: fix compilation without CONFIG_VAAPI_1
This adds VAAPIEncodeContext *ctx that has been removed
in aa82340b0c.

Signed-off-by: Ingo Brückl <ib@oddnet.de>
2024-10-12 09:10:30 +08:00
Lynne
0e19b05375
vulkan: fix layout qualifiers for 32-bit RGBA float storage reps
r8
r16/r16f
r32f

Sure, GLSL. Makes sense.
2024-10-12 00:38:49 +02:00
Lynne
8c47cf9eea
hwcontext_vulkan: enable shaderBufferInt64Atomics if supported 2024-10-11 23:54:23 +02:00
Lynne
168e8ae9bf
hwcontext_vulkan: add support for AV_PIX_FMT_RGBF32 2024-10-11 23:54:23 +02:00
Lynne
d55a351741
hwcontext_vulkan: add support for AV_PIX_FMT_RGBAF32 2024-10-11 23:54:22 +02:00
Lynne
1addd0fdca
vulkan: use correct signed image type for storage images
Using signed or unsigned integer formats/layouts requires that
"uimage" or "iimage" are used.
2024-10-11 23:54:22 +02:00
Lynne
c982376076
vulkan: extend ff_vk_shader_rep_fmt to be useful for bitexactness
The original either reported 8 or 16-bit conversion from the
original, rather than being able to return the actual original.

This makes it usable in a situation where preserving exactness
is required.
2024-10-11 23:54:18 +02:00
James Almer
bd6283342c avcodec/hevc/ps: add a range check for sps_max_sub_layers
It can't be higher than vps_max_sub_layers.

Do this while keeping the workaround for qsvenc_hevc calling ff_hevc_parse_sps()
without a vps_list, as in some cases it needs to parse an sps to generate a fake
vps derived from it.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-11 16:17:48 -03:00
James Almer
3290692d18 avcodec/hevc/ps: return a proper error code when we don't support parsing an sps
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-11 16:10:45 -03:00
James Almer
1cead90292 avutil/pixdesc: use a bigger variable type when writing bitstream formats
Fixes fate-imgutils and fate-pixelutils under gcc-usan after
29ea34728f.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-10 16:03:22 -03:00
Michael Niedermayer
7bb283aa7b
avcodec/ffv1: Implement CRC with non zero initial and final value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-10 19:34:10 +02:00
Michael Niedermayer
b7ff66a358
avcodec/ffv1enc: Prevent generation of files with broken slices
Fixes: Ticket5548

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-10 19:34:09 +02:00
Anton Khirnov
0f5592cfc7 fftools/ffmpeg: supply hw device context to probe-filtergraphs
I.e. those that are only used to figure out input/output counts, since
some filters might expect a valid hw device in init and refuse to
initalize otherwise.

This requires complex filtergraphs to be created in a separate step
after parsing global options, after all hw devices are guaranteed to
exist.
2024-10-10 09:09:29 +02:00
Anton Khirnov
84c2ca6fa0 fftools/ffmpeg_filter: do not leak graph_desc on fg_create() failure
fg_create() is passed a malloced string and assumed to always take
ownership of it.
2024-10-10 09:09:29 +02:00
Anton Khirnov
181c204145 fftools/ffmpeg_opt: add a struct to be passed as opaque to global-option handlers
Will be useful in following commits.
2024-10-10 09:09:29 +02:00
Anton Khirnov
840b95bcc2 fftools/cmdutils: do not treat single '-' as an option in locate_option()
Fixes early parsing of trailing -v/-loglevel while using '-' to output
to stdout.
2024-10-10 09:09:29 +02:00
Anton Khirnov
e56d676050 fftools/cmdutils: group related calls together
For readability only, should have no functional effect.
2024-10-10 09:09:29 +02:00
Michael Niedermayer
c4122406f6
avformat/matroskadec: Check desc_bytes so bits fit in 64bit
Likely a tighter check can be done

Fixes: signed integer overflow: 3305606804154370442 * 8 cannot be represented in type 'long'
Fixes: 70449/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-4771166007918592

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-09 21:26:47 +02:00
Michael Niedermayer
057b8c2066
avformat/mov: Avoid overflow in dts
This basically ignores the overflow without undefined behavior, alternatively we could detect and error out

Fixes: signed integer overflow: 6310596683470275584 + 7660622966157213696 cannot be represented in type 'long'
Fixes: 70433/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5483347233538048
Fixes: 369662284/clusterfuzz-testcase-minimized-media_metadata_parser_fuzzer-5327368763670528

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-09 21:26:46 +02:00