Commit Graph

26800 Commits

Author SHA1 Message Date
Zhao Zhili
9034ca30ef avformat/flacdec: fix self assign warning 2025-10-09 03:41:29 +00:00
James Almer
660983b7f3 avformat/mccenc: use Lavf version string instead of FFmpeg
The muxed subtitle is created by libavformat, and as such that's what should be
reported. This is in line with the string we write for every other muxer.
After this change, the muxer will no longer be recompiled every time a commit
is made.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-10-06 11:51:50 -03:00
James Almer
9b709532d5 avformat/demux: don't overwrite container level color information if set
If the information is coded at the container level, then that's what should be
exported. The user will still have access to values coded at the bitstream
level by firing a decoder.

Fixes issue #20121

Signed-off-by: James Almer <jamrial@gmail.com>
2025-10-05 13:22:17 -03:00
Marton Balint
f1d5114103 avformat/tls_openssl: do not cleanup tls after a successful dtls_start()
Regression since 8e11e2cdb8.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-02 18:41:47 +02:00
Zhao Zhili
1a02412170 avformat/movenc_ttml: fix memleaks
Memory leaks can happen on normal case when break from while loop
early, and it can happen on error path with goto cleanup.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-10-01 22:31:03 +08:00
Romain Beauxis
cb4052beae libavformat/oggparseopus.c: Parse comments from secondary chained streams header packet. 2025-10-01 14:20:55 +00:00
Romain Beauxis
45d7d5d3e2 libavformat/oggparseflac.c: Parse ogg/flac comments in new ogg packets, add them to ogg stream
new_metadata.
2025-10-01 14:20:55 +00:00
Romain Beauxis
7dbf7d2a45 libavformat/oggdec.c: Use AV_PKT_DATA_STRINGS_METADATA to pass metadata updates. 2025-10-01 14:20:55 +00:00
Romain Beauxis
cebbb6ae8a libavformat/oggdec.h, libavformat/oggparsevorbis.c: Factor out vorbis metadata update mechanism. 2025-10-01 14:20:55 +00:00
Romain Beauxis
de8d57e4c5 ogg/vorbis: implement header packet skip in chained ogg bitstreams. 2025-10-01 14:20:55 +00:00
Marton Balint
8e11e2cdb8 avformat/tls_openssl: initialize underlying protocol early for dtls_start()
The same way we do with TLS, so all tls URL options will be properly supported.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
2762ae74c5 avformat/tls: use ff_parse_opts_from_query_string() to set URL parameters
Note that this changes the code to work the same way as other protocols where
an URL parameter can override an AVOption.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
3166e3b539 avformat/rtpproto: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
f231439ee7 avformat/sctp: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
49c6e6cc44 avformat/tcp: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
7e58fff9d0 avformat/udp: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
2d06ed9308 avformat/libsrt: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
70e0e3e257 avformat/utils: add helper function to set opts from query string
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:18 +02:00
Marton Balint
c5be4b7075 avformat: compile urldecode unconditionally
It will be used by the generic helper function to set options from URLs.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-30 23:48:14 +02:00
Marton Balint
6f17053e6c avformat/urldecode: add ff_urldecode_len function
This will be used later to decode partial strings.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-30 23:48:14 +02:00
Michael Niedermayer
8cb1ff78ac avformat/dhav: Factorize some code in get_duration()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-09-30 21:13:56 +00:00
Jack Lau
bc561013c9 avformat/whip: add RTX initial support
Refer to RFC 4588.

Add and set the basic param of RTX like
ssrc, payload_type, srtp.

Modify the SDP to add RTX info so that
the peer be able to parse the RTX packet.

There are more pateches to make RTX really
work.

Signed-off-by: Jack Lau <jacklau1222@qq.com>
2025-09-30 05:42:40 +00:00
Kaarle Ritvanen
0fdb5829e3 avformat/rtsp: set AVFMTCTX_UNSEEKABLE flag
for live RTP streams. Some external applications, such as Qt Multimedia,
depend on this flag being set correctly.

Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
2025-09-28 13:37:43 +00:00
Kacper Michajłow
d6cb0d2c2b ALL: move av_unused to conform with standard requirement
This is required placement by standard [[maybe_unused]] attribute, works
the same for __attribute__((unused)).

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-09-26 16:15:46 +00:00
James Almer
6d8732f397 avformat/movenc: clear subsample information on fragment flush
Don't keep around information from a previous traf atom.

Fixes issue #20492.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-09-25 23:18:08 -03:00
Marvin Scholz
5cb6d2221a avformat/http: Handle IPv6 Zone ID in hostname
When using a literal IPv6 address as hostname, it can contain a Zone ID
especially in the case of link-local addresses. Sending this to the
server in the Host header is not useful to the server and in some cases
servers refuse such requests.

To prevent any such issues, strip the Zone ID from the address if it's
an IPv6 address. This also removes it for the Cookies lookup.

Based on a patch by: Daniel N Pettersson <danielnp@axis.com>
2025-09-24 12:03:13 +00:00
Marvin Scholz
e63e040f0c avformat/rtsp: fix leading space in RTSP reason
When parsing the RTSP message reason, the whole remainder
after parsing the status code was used, which would lead to
a leading space in the parsed reason string.
2025-09-23 21:33:37 +00:00
Marvin Scholz
2ed47ab725 avformat/rtsp: do not log invalid values
When reading fails the first time, ch would be uninitialized and
printed in the log message. Instead check for an error early and
log it properly.
2025-09-23 21:33:37 +00:00
Derek Buitenhuis
ae03b629db avformat/mov: Merge tts after building index for old-style uncompressed PCM
This was a regression introduced in 292c1df7c1.

Since we don't know the length of the stts data until after building the
index, since we're generating it, we need to merge any ctts data after,
since otherwise tts_count is set to 0, and no packets will be output.

We can't remove the merge entirely, because uncompressed PCM with
a ctts atom is technically valid (e.g. a constant CTS offset).

This fixes old-style uncompressed PCM demuxing.

Fixes #11490.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2025-09-23 14:39:13 +01:00
Paul B Mahol
e5ac70042e avformat/aiff: add support for ADPCM N64 decoder
(cherry picked from commit 0fdf549a890f276243ba62f194e0ec08b10df60f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-09-22 23:46:29 +00:00
Paul B Mahol
00eef74336 avformat/adxdec: add AHX support
(cherry picked from commit b40bb6ad1e5739dd7927f3be5c2a06fb8aeef0cb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-09-22 23:46:29 +00:00
asivery
97bfb606e3 avformat/aeadec, avcodec/atrac1: Fix 8 and 4-channel ATRAC1 support
Signed-off-by: asivery <asivery@protonmail.com>
(cherry picked from commit 81cdf42222961c2959f1ede2d86fea0d1dcbbfcb)
2025-09-22 23:46:29 +00:00
Paul B Mahol
066432ebcf avcodec: add ADPCM IMA Escape audio decoder
(cherry picked from commit 4a663e78c4421da226e7d480d6767de803ee2122)
2025-09-22 23:46:29 +00:00
Andreas Rheinhardt
b815431126 Revert "avformat/tls_openssl: add av_assert0() for tls_shared"
This reverts commits fd55c4b5f7
(for tls_openssl.c) and c74181a04b
(for tls_gnutls.c).

It is impossible for a pointer to a member of a structure
to be NULL: If the containing structure exists, the member
exists and can't have a NULL address; if the containing
structure does not exist, then getting a pointer to the
substructure via &c->tls_shared would already be undefined
behavior.

Reviewed-by: Kacper Michajłow <kasper93@gmail.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-22 22:02:03 +02:00
Andreas Rheinhardt
db6cd6c6bf avformat/tls_openssl: Don't call functions inside FFMIN
It may call the function multiple times.

Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-22 21:58:00 +02:00
Zhao Zhili
dcddb2bf08 avformat: add hxvs demuxer 2025-09-21 17:42:19 +08:00
Brad Smith
db0b86a4ad avformat/udp: fix warning about unused varible
libavformat/udp.c:283:9: warning: unused variable 'i' [-Wunused-variable]

Signed-off-by: Brad Smith <brad@comstyle.com>
2025-09-20 22:59:50 -04:00
Michael Niedermayer
55e71768cf avformat/dhav: Fix off by length of read element error
Fixes: out of array read
Fixes: BIGSLEEP-445383648
Fixes: crash_input_1/2/3.dhav

Found-by: Google Big Sleep
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-09-21 00:49:44 +00:00
Lynne
8d65da767b lavf: fix demuxing of FLAC files with id3v2 tags
Due to the recent id3v2 refactor, FLAC was left out due to
earlier code not checking for id3v2 presence on FLAC.
Without the id3v2 data parsed, detection of FLAC and therefore
demuxing fails.

Fixes 9d037c54f2
2025-09-20 22:46:39 +09:00
Lynne
99285cba21 lavf/id3v2: report incorrect BOM value on error 2025-09-20 22:46:35 +09:00
Andreas Rheinhardt
49b5c17e09 avformat/mccdec: Constify data
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:31:10 +02:00
Andreas Rheinhardt
cce1af5413 avformat/mccenc: Hardcode codec names
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:31:05 +02:00
Andreas Rheinhardt
f65875c082 avformat/mccdec: Avoid relocations
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:31:02 +02:00
Andreas Rheinhardt
e965fe9057 avformat/mccenc: Avoid relocations
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:30:59 +02:00
Andreas Rheinhardt
28f0b7a237 avformat/mccenc: Add newlines to logmessages
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:30:53 +02:00
Andreas Rheinhardt
3c79219e93 avformat/mccenc: Check version-timecode compatibility earlier
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:30:33 +02:00
Andreas Rheinhardt
159330016c avformat/mccenc: Deduplicate strings
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:30:28 +02:00
Andreas Rheinhardt
d81a971b35 avformat/mccenc: Constify read-only data
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:30:24 +02:00
Andreas Rheinhardt
62dd3e1e7d avformat/mccenc: Remove redundant setting of time base
It has already been done in init.

Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:30:20 +02:00
Andreas Rheinhardt
0cd78bddc4 avformat/mccenc: Fix assert check
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:30:17 +02:00