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

120502 Commits

Author SHA1 Message Date
Kimapr
ecef5f9e1f avformat/libopenmpt: fix seeking weirdness
- proper pts for packets. leaving it blank leaves it up for guessing,
  but the guess doesn't take seeking into account, causing weirdness.

- clamp to 0 when seeking to negative ts. libopenmpt docs are unclear on
  this but not doing this causes an immediate EOF when seeking backwards
  to the beginning in mpv.

- only set song duration and packet pts when they are non-negative and
  in int64 range. NaNs count as out of range. this isn't a fix for any
  specific issue but might be helpful still, and shouldn't break
  anything.
2025-08-04 19:51:59 +00:00
Ronan Waide
09828e7fe2 avcodec/dvbsubenc: add a min_bpp option to work around some decoders
As noted in the code in several places, some DVB subtitle decoders
don't handle 2bpp color. This patch adds a min_bpp option which
sets a lower bound on the number of bits-per-pixel in the color
tables. It defaults to 4 to avoid the problematic 2bpp decoders.

Signed-off-by: Ronan Waide <waider@waider.ie>
2025-08-04 19:45:45 +01:00
Marton Balint
a84d060aa1 avformat/internal: retire ff_get_frame_filename
It no longer has any users.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-08-04 18:03:29 +00:00
Marton Balint
c31df899d9 avformat/img2enc: use a AVBPrint buffer for generating the filename
This removes all path length limits from img2enc.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-08-04 18:03:29 +00:00
Marton Balint
ec64d9b73b avformat/utils: add ff_bprint_get_frame_filename
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-08-04 18:03:29 +00:00
Marton Balint
7410e29f5d avformat/img2enc: allocate temp and target filename dynamically
To avoid truncation of filename with additional .tmp extension.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-08-04 18:03:29 +00:00
Yalda
9b0cc80dc2 forgejo/ISSUE_TEMPLATE: create Issue ticket template based on TRAC form
This is based on the previously used, simple TRAC form
with new description language.

We can iterate on it to improve as needed.

Signed-off-by: Yalda <marth64@proxyid.net>
2025-08-04 16:15:27 +00:00
Martin Storsjö
1ea63b1786 forgejo/CODEOWNERS: Add myself for arm/aarch64 assembly 2025-08-04 13:39:47 +03:00
Leon Grutters
9a32b86307 avcodec/webvttdec: strip classes
If a supported tag has a class, e.g "<i.bold>" it is ignored entirely;
so for example "<i.bold>Hello</i>" would be converted to "Hello{\i0}"
instead of the intended "{\i1}Hello{\i0}".

Signed-off-by: Leon Grutters <gruttersleonbot2@gmail.com>
2025-08-04 09:12:17 +00:00
Peter Ross
09c372a323 tests/fate/audio: Sanyo LD-ADPCM test case 2025-08-04 08:01:24 +00:00
Peter Ross
9cd5743a3d tests/fate/video: LEAD MCMP test case 2025-08-04 08:01:24 +00:00
Peter Ross
4a1d664ae9 tests/fate/demux: IFF ANIM test case 2025-08-04 08:01:24 +00:00
Peter Ross
02bb64849a tests/fate/audio: G.728 test case 2025-08-04 08:01:24 +00:00
Gyan Doshi
00be24c2d7 doc/bitstream_filters: correct variable use in examples
Time has to be expressed as timestamp x time base

Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
2025-08-04 12:21:19 +05:30
Lynne
c78195788d forgejo/CODEOWNERS: fix alphabetical order
Oops.
2025-08-04 15:24:27 +09:00
Kacper Michajłow
193938e640 tests/fate/subtitles: add test for LRC with ms -> ms conversion
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-04 03:59:42 +00:00
Kacper Michajłow
670c1b9266 avformat/lrcenc: add precision option
Allows to output LRC with more precision than standard centiseconds.
Time base is determined by number of requested digits.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-04 03:59:42 +00:00
Kacper Michajłow
a29aeee37e tests/fate/subtitles: add test for LRC with milliseconds timestamp
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-04 03:59:42 +00:00
Kacper Michajłow
bc3cc0a6af avformat/lrcdec: support arbitrary precision timestamp
Apparently files with milliseconds exist in the wild. And since it cost
nothing to support arbitrary number of digits, extend format to support
that.

Depending on number of digits, the time base of fractional part is
changing. Most LRCs use 2 digits and centiseconds base, but subs with 3
digits and miliseconds exist too.

Set internal time base to AV_TIME_BASE, which in parcitice allows to
hold microseconds with 6 digits. Totally artificial, but who knows maybe
someone wants that.

Fixes: #11677

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-04 03:59:42 +00:00
James Almer
e916f55c91 forgejo/CODEOWNERS: add missing handle to new entries
Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-04 00:10:43 -03:00
James Almer
cae8c4587a forgejo/CODEOWNERS: add myself for iamf
Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-04 00:02:56 -03:00
Lynne
ceaa8ed96b forgejo/CODEOWNERS: add a CODEOWNERS file to automatically add reviewers
This helps with finding reviews.
2025-08-04 11:49:01 +09:00
Kacper Michajłow
c447fab16c forgejo/workflows: run fate with assert level 2
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-04 02:27:23 +00:00
Jiasheng Jiang
55d234b433 libavcodec/tests/motion: Add check for avcodec_alloc_context3()
Add check for the return value of avcodec_alloc_context3() to avoid potential NULL pointer dereference.

Fixes: 5d48e4eafa ("Merge commit 'a6a750c7ef240b72ce01e9653343a0ddf247d196'")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-04 01:29:45 +02:00
Jiasheng Jiang
9ca58424de examples: Add av_freep to avoid potential memory leak
Add av_freep() to free avio_ctx_buffer if avio_alloc_context fails
to avoid potential memory leak.

Fixes: 5fc4dea39c ("examples: add avio_reading.c example")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-04 01:29:44 +02:00
Jiasheng Jiang
ab040e2565 avcodec/tests/avpacket: Add av_packet_free() to avoid memory leak
Add av_packet_free() to free avpkt_clone and avpkt in the error paths to avoid potential memory leak.

Fixes: da3c69a5a9 ("Added test for libavcodec/avpacket.c")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-04 01:29:44 +02:00
Jiasheng Jiang
008679ec16 avcodec/tests/avpacket: Add av_free() to avoid memory leak
Add av_free() to free extra_data if av_packet_add_side_data() fails.

Fixes: da3c69a5a9 ("Added test for libavcodec/avpacket.c")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-04 01:29:44 +02:00
James Almer
3f58c9df14 avfilter/x86/vf_bwdif: use the correct preprocessor check
Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-03 19:26:18 -03:00
Niklas Haas
7f00e24d70 vf_bwdif: add AVX512 implementation
I also tried replacing some of the instructions by more elaborate ones
using masks, but I found no performance gain significant enough to be worth
maintaining two code paths, so this implementation merely replaces the AVX2
implementation by drop-in AVX512 equivalents.

bwdif8_c:                                             6362.2 ( 1.00x)
bwdif8_sse2:                                          1004.9 ( 6.33x)
bwdif8_ssse3:                                          946.0 ( 6.73x)
bwdif8_avx2:                                           477.9 (13.31x)
bwdif8_avx512:                                         273.3 (23.28x)

bwdif10_c:                                            6341.5 ( 1.00x)
bwdif10_sse2:                                          872.4 ( 7.27x)
bwdif10_ssse3:                                         803.4 ( 7.89x)
bwdif10_avx2:                                          416.7 (15.22x)
bwdif10_avx512:                                        224.3 (28.27x)

Realtime test at 3840x2160 yuv420p:

avx2:   frame=20000 fps=3370 q=-0.0 Lsize=N/A time=00:06:40.00 bitrate=N/A speed=67.4x elapsed=0:00:05.93
avx512: frame=20000 fps=5077 q=-0.0 Lsize=N/A time=00:06:40.00 bitrate=N/A speed= 102x elapsed=0:00:03.93

The use of this function is gated behind avx512icl so that it doesn't
downclock on Skylake.
2025-08-03 22:13:51 +00:00
Leon Grutters
586a1cd088 avformat/webvttdec,webvttenc: update documentation
The previous links lead to a 404 page as that page doesn't exist anymore.

Signed-off-by: Leon Grutters <gruttersleonbot2@gmail.com>
2025-08-03 21:24:38 +00:00
Kacper Michajłow
cc6ad703b4 forgejo/lint_commit_msg: add script for commit message linting
Based on mpv's script, under LGPL. https://github.com/mpv-player/mpv

Co-authored-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-03 20:45:12 +00:00
Marton Balint
d5f7a428b1 avcodec/dvbsubenc: fix 256 color rle decoding
The end of 8-bit/pixel_code_string() is signalled with two zero bytes, so we
should read those from the buffer instead of one. We keep supporting though our
own buggy encoder which only put one zero byte there.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-08-03 21:33:29 +02:00
Marton Balint
aeb6ea51f5 avcodec/dvbsubdec: convert dvbsub_read_8bit_string to bytestream reader
No change in functionality.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-08-03 21:33:29 +02:00
Marton Balint
74f470c05c avcodec/dvbsubenc: fix end of 8-bit/pixel-code-string
Fixes ticket #11606.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-08-03 21:33:29 +02:00
James Almer
3e859d933e avformat/mov: item names can be NULL in infe boxes
Fixes assertions after 11a5333980.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-03 16:28:19 -03:00
Kacper Michajłow
5c95e8e3a6 avcodec/srtenc: don't produce SRT files with mixed line endings
Initially, avcodec/srtenc.c was outputting CRLF [1]. Later, a real SRT
muxer was added [2], which outputs LF. The original srtenc.c was
converted to use the muxer [3], changing its output to LF, except for
newline characters within subtitle text.

Fix this to avoid producing SRT files with mixed line endings.

[1] 8e43b6fed9
[2] 9e63c30daa
[3] 55180b3299

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-03 17:27:35 +00:00
James Almer
5bd7003e81 avformat/mov: move AVC-Intra extradata generation to earlier in the stsd parsing process
This will ensure it will be stored in the stream's private context, so it can
be fetched and replaced as required.

Fixes a regression since eefa6de7d5.
Fixes avc-intra-panasonic-AG-HPX301E.mov

Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-03 16:06:43 +00:00
James Almer
999e3e9bf8 avformat/mov: don't set stsc_count for item streams before the array is allocated
Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-03 13:00:03 -03:00
James Almer
89187a84d3 avformat/mov: free streams earlier on error when parsing infe boxes
Fixes clusterfuzz-testcase-minimized-fuzzer_loadfile-5365661771825152.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-03 13:00:03 -03:00
James Almer
11a5333980 avformat/mov: free AVBPrint on error when parsing infe boxes
Should fix memleaks.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-03 13:00:03 -03:00
Michael Niedermayer
44864dbbb9 avcodec/vqavideo; Check bytestream2_get_buffer() reading next_codebook_buffer
Fixes: use of uninintilaized memory
Fixes: 423673969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQA_fuzzer-6235973619351552

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-03 13:19:25 +00:00
Michael Niedermayer
7e9e7cb3b6 avcodec/iff: Clear ham_buf
Fixes: use of uninitialized memory
Fixes: 423673969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-6651797156724736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-03 13:19:25 +00:00
Michael Niedermayer
715df4b1ff avcodec/imc: Clear padding of buf16
Fixes: use of uninitialized memory
Fixes: 423673969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IAC_fuzzer-6685890556788736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-03 13:19:25 +00:00
Michael Niedermayer
ea3851bebf avcodec/cri: Check bytestream2_get_buffer() for end
Fixes: use of uninintialized memory
Fixes: 423673969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-5910856640823296

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-03 13:19:25 +00:00
Michael Niedermayer
d9bf3c141b avcodec/cri: Factor read_len out
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-03 13:19:25 +00:00
Michael Niedermayer
610d368d9b avcodec/lzf: Check for input space
Fixes: use of uninitialized memory
Fixes: 423673969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NOTCHLC_fuzzer-5597015691296768

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-03 13:19:25 +00:00
Michael Niedermayer
1687daa93c avcodec/fits: Clear naxis
Fixes: Use of uninitialized memory
Fixes: 423673969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FITS_DEC_fuzzer-5602250833854464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-03 13:19:25 +00:00
Timo Rothenpieler
16d663d371 forgejo/workflows: add pre-commit based linting 2025-08-03 13:48:47 +02:00
Timo Rothenpieler
262d41c804 all: fix typos found by codespell 2025-08-03 13:48:47 +02:00
Timo Rothenpieler
8d439b2483 all: fix whitespace/new-line issues 2025-08-03 13:48:47 +02:00