Commit Graph

26677 Commits

Author SHA1 Message Date
Michael Niedermayer 638b521c7b
Bump versions for master after release/8.0
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-09 18:03:05 +02:00
Michael Niedermayer 7eaa0f799a
Bump versions for release/8.0
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-09 17:30:39 +02:00
Timo Rothenpieler 5621eee672 avformat/tls: switch on peer certificate verification by default 2025-08-09 00:38:17 +00:00
Jacob Lifshay 14a95ab471
lavf: add mcc muxer
Signed-off-by: Jacob Lifshay <programmerjake@gmail.com>
2025-08-08 03:04:42 -07:00
Jacob Lifshay ceb9688fee
lavf/mccdec: clean up, add support for mcc 2.0 features, and add SMPTE_436M_ANC output stream
Signed-off-by: Jacob Lifshay <programmerjake@gmail.com>
2025-08-08 03:04:42 -07:00
Jacob Lifshay a18d5a766d
lavf/mxfenc: support EIA-608/708 streams by using eia608_to_smpte436m bsf
Signed-off-by: Jacob Lifshay <programmerjake@gmail.com>
2025-08-08 03:04:42 -07:00
Jacob Lifshay a566fcb9dc
lavf: mxf [de]muxer now uses AV_CODEC_ID_SMPTE_436M_ANC instead of ..._NONE
this makes it easier to match against when using that format from other parts of ffmpeg.

Signed-off-by: Jacob Lifshay <programmerjake@gmail.com>
2025-08-08 03:04:40 -07:00
Lynne 5ff2886e9a
lavc: add a ProRes RAW parser
Simple parser that only parses frame information.
This helps avoid requiring the software decoder on init to decode a
single frame, since the decoder can be quite slow.
2025-08-08 01:06:11 +09:00
Lynne 4ad35d78c9
lavc: add codec ID and profiles for ProRes RAW 2025-08-08 01:06:11 +09:00
Kacper Michajłow fa458c7243 avformat/hls: fix handle_init_section_args callback type
Fixes: utils.c:524:9: runtime error: call to function
       handle_init_section_args through pointer to incorrect function type
       'void (*)(void *, const char *, int, char **, int *)'

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-07 07:36:33 +00:00
Maryla Ustarroz-Calonge d5040b5560
avcodec/itut35: rename some provider codes
In general, a provider code corresponds to a company/organization, and
the name should be that of the company, not of a given feature.
The feature is signalled in the "provider oriented code".

The exception is HDR Vivid, where the code 0x0004 indicates the HDR Vivid
feature itself rather than CUVA (China UHD Video Industry Alliance),
according to the UHD World Associations 'HDR Video Technology Part 2-1
Application Guide to System Integration' document.

ITU_T_T35_PROVIDER_CODE_CUVA -> ITU_T_T35_PROVIDER_CODE_HDR_VIVID
ITU_T_T35_PROVIDER_CODE_LCEVC-> ITU_T_T35_PROVIDER_CODE_VNOVA
ITU_T_T35_PROVIDER_CODE_SMTPE -> ITU_T_T35_PROVIDER_CODE_SAMSUNG

Signed-off-by: Maryla Ustarroz-Calonge <maryla@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-07 03:07:43 +02:00
Wu Jianhua df5199c63f avformat/Makefile: fix error unresolved external symbol ff_dtls_protocol
Introduced by 307983b292

Use the following command line to reproduce the issue:
./configure --toolchain=msvc --disable-asm --enable-ffmpeg \
--disable-everything --enable-decoder=vvc --enable-parser=vvc \
--enable-demuxer='vvc,mpegts' --enable-protocol='file,pipe' \
--enable-encoder='rawvideo,wrapped_avframe' \
--enable-muxer='rawvideo,md5,null'

Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-08-07 01:17:14 +08:00
James Almer 2681eede9c avformat/mov: set primary extradata based on the first Sample only if it's not already in place
If the first Sample references the first stsd entry, then setting it here is
redundant.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-06 10:37:01 -03:00
James Almer 8be539b022 avformat/iff: fix EOF check
The check to return on EOF should not be inside a block that will not be entered after reaching EOF.
Should fix "libavcodec/bytestream.h:144:27: runtime error: applying zero offset to null pointer".

Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-05 00:24:08 -03:00
Kacper Michajłow 96ab006566
avformat/ffmetadec: don't compare undefined string
Fixes use-of-uninitialized-value when bp.len == 0.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-05 03:27:53 +02:00
Michael Niedermayer f3c3a6ecfb avformat/hls: add cmfv/cmfa exceptions
Fixes: Ticket11526

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-04 20:04:29 +00:00
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
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
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 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
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
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
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
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
Michael Niedermayer ce0a655f85
avformat/dashdec: Allocate space for appended "/"
Fixes: writing 1 byte over the end of the array
Fixes: BIGSLEEP-433502298/test.xml

Found-by: Google Big Sleep

A prettier solution is welcome!
A testcase exists only for the baseurl case

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-03 00:31:12 +02:00
James Almer 2b522f537f avformat/mov: add extra sanity checks before setting the primary extradata
Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-01 19:35:43 +00:00
James Almer 9aed7383bd avformat/movenc: look for the Intra profile flag before assuming a stream is AVC-Intra
Fixes issue #20018.

Note that Codec Descriptors are not written for all these ai** codec tags, and no
considerations were ever made to ensure parameter sets are present in muxed packets.
Their usage may result in unplayable files if parameter sets are only available
in extradata (Default behavior for x264 encoding when combined with this muxer).

Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-01 14:53:17 +00:00
sfan5 1a61db9797 avformat/file: add missing null check in Android content resolver
openFileDescriptor() can return null in certain error conditions.

Signed-off-by: sfan5 <sfan5@live.de>
Reviewed-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-07-31 19:54:58 +08:00
Vittorio Giovara 119d127d05 lavu/spherical: Add support for Spherical Immersive type 2025-07-31 10:58:36 +02:00
Vittorio Giovara c275f3bfa1 mov: Export frame packing information from pack box 2025-07-31 10:49:27 +02:00
zhaozhenghang eade338656 libavformat/mov.c: Fix "statement will never be executed" warning
That occurs when H261, H263, and MPEG4 decoders are disabled.

Signed-off-by: zhaozhenghang <15083277223@163.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-07-31 11:13:04 +08:00
James Almer 4eca8df8b8 avformat/movenc: support writing more than one STSD entry per track
If a packet contains new extradata within a side data entry, save for
specific cases it means the coded stream changed. If ignored, upon
demuxing every packet from then onwards may be undecodable.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-30 16:48:14 -03:00
James Almer 306448756b avformat/movenc: allow storing more than one extradata buffer per track
This is in preparation for a following change

Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-30 16:48:14 -03:00
James Almer eefa6de7d5 avformat/mov: export the correct initial extratada from samples with multiple stsd
The first sample in the stsc box may not refer to the first stsd entry.
This is the case in h264/thezerotheorem-cut.mp4, and as such the
fate-h264_redundant_pps-side_data test is updated accordingly.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-30 16:48:14 -03:00
Kacper Michajłow daee46ed7e Revert "avformat/tls_openssl: properly get new BIO index"
BIO_get_new_index() is static counter meant to get index for custom bio
type definition. As we can read in the documentation:

> Note that BIO_get_new_index() can only be used 127 times before it
> returns an error.

We cannot call it repeatedly, because it will fail eventually.

To my understanding the index is not needed in our use and we could
safely use BIO_TYPE_NONE. Documentation states:

> type can be set to either BIO_TYPE_NONE or via BIO_get_new_index() if
> a unique type is required for searching (See BIO_find_type(3))

We don't use any search related functions.

This reverts commit 816dad231f.
Fixes: https://github.com/mpv-player/mpv/issues/16589

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-07-30 02:56:12 +02:00
Michael Niedermayer ebcdba4c6b
avformat/subfile: Initialize end on all cases
Fixes: use of uninitialized variable
Regression since: e29016a9de

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-30 01:18:03 +02:00
Michael Niedermayer a408b74977
avformat/dhav: Remove end_ prefix from variable names
The end_ prefix is confusing and may have contributed the mixup
fixed in the previous commit

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-28 19:29:52 +02:00
Michael Niedermayer 33ae6cda71
avformat/dhav: fix reference point mixup
Fixes: reading the duration from before the start of the allocated buffer.

Regression since: 36ec9217e6

Fixes: BIGSLEEP-433513232/test

Found-by: Google Big Sleep
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-28 19:29:52 +02:00
Michael Niedermayer 1b12e919cf
avformat/mxg: clear AV_INPUT_BUFFER_PADDING_SIZE
Fixes: use of uninitialized memory
Fixes: 427532813/clusterfuzz-testcase-minimized-ffmpeg_dem_MXG_fuzzer-5661938917113856

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-28 17:41:38 +02:00
Michael Niedermayer 1b7a327b3a
avformat/vqf: Ensure that comm_chunk is fully read
Fixes: use of uninitialized memory
Fixes: 412125811/clusterfuzz-testcase-minimized-ffmpeg_dem_VQF_fuzzer-6253774274887680

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-28 17:41:37 +02:00
Michael Niedermayer c6cb3ab7ff
avformat/mxfdec: Ensure klv->key is initialized
Fixes: read of uninitialized memory
Fixes: 391916474/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4935250956845056

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-28 17:41:37 +02:00
Michael Niedermayer 8b16e1ddd9
avformat/mov: make sure file_checksum is fully initialized
Fixes: use of uninitialized memory
Fixes: 394990189/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6431722199908352

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-28 17:41:37 +02:00
Michael Niedermayer fa197924a6
avformat/asfdec_f: Check amount of value read
Fixes: use of uninitialized memory
Fixes: 403675492/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_fuzzer-4754281823797248

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-28 17:41:36 +02:00