1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

26134 Commits

Author SHA1 Message Date
James Almer
e907bf677a avformat/mov: split off lcevc stream group initialization to its own function
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-05 14:36:28 -03:00
James Almer
d5eb0e7fb3 avformat/mov: split off heif item initialization to its own function
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-05 14:36:28 -03:00
James Almer
650ce61745 avformat/mov: don't abort on invalid clap box data
Unless explode is requested.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-02 12:38:24 -03:00
James Almer
7573f02840 avformat/mov: get heif image mirroring from imir box
Complements 76eb3e5ff3.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-02 12:38:24 -03:00
James Almer
f225e6f3c6 avformat/mov: parse clap boxes that reference heif items
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-02 12:38:24 -03:00
James Almer
ba6eeb2c65 avformat/mov: parse colr boxes that reference tile grids
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-02 12:38:24 -03:00
James Almer
58c265d956 avformat/mov: factorize getting the current item
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-02 12:38:24 -03:00
Tomas Härdin
25d605d080 lavf/mxfdec: Remove a call to avio_tell() in klv_read_packet() 2024-10-01 18:57:19 +02:00
Tomas Härdin
649ac17efd lavf/mxfdec: Speed up mxf_edit_unit_absolute_offset()
This involves computing the approximate location of the desired index table segment and linearly searching from there.
2024-10-01 18:57:19 +02:00
Tomas Härdin
e3fa469a55 lavf/mxfdec: Speed up klv_read_packet() 2024-10-01 18:57:19 +02:00
James Almer
76eb3e5ff3 avformat/mov: get heif image rotation from irot box
Based on a patch by Hacene Bouaroua.
Fixes ticket #11171.

Co-authored-by: Hacene Bouaroua <hbouaroua@freebox.fr>
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-30 14:37:27 -03:00
James Almer
50d1b89fa0 avformat/avformat: add side data to AVStreamGroupTileGrid
Will be used to export certain information present in HEIF samples, like
rotation metadata, ICC profiles, and potentially others.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-30 14:36:24 -03:00
James Almer
04182b5549 avformat/mov: don't return the latest stream when an item stream is expected
Otherwise, things like ICC profiles as read from the colr box meant for an item
with no stream (like a grid) may end up being added to the wrong stream.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-30 10:59:05 -03:00
Jonathan Baecker
f3d2624bfa avformat/hlsenc: Fix missing EXT-X-DISCONTINUITY tag in subtitle streams
The EXT-X-DISCONTINUITY tag was not being added to subtitle streams,
causing synchronization issues.i
This patch ensures that the tag is applied consistently across video and subtitle streams.

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2024-09-30 19:22:25 +08:00
Zhao Zhili
f56a54387b avformat/img2enc: Fix integer truncation when frame_pts is enabled
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-09-29 20:46:42 +08:00
Zhao Zhili
a2d9663241 avformat/internal: Add ff_get_frame_filename
It's similar to av_get_frame_filename2 but with int64_t number
support. Make av_get_frame_filename* a wrapper over
ff_get_frame_filename.

Co-authored-by: Filip Mašić <shoutplenty@gmail.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-09-29 20:46:09 +08:00
James Almer
01c47dd235 avformat/dump: don't print streams withing a group twice
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-27 19:44:18 -03:00
James Almer
9d265a9677 avformat/dump: reduce indentation when printing streams within a group
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-27 19:43:47 -03:00
James Almer
545de54e3e avformat/dump: always print non-tile streams in tile grid groups
This ensures streams in the group that don't belong in the grid are printed with
the default log level.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-27 14:36:10 -03:00
Michael Niedermayer
38e224c2ba
*/version.h: bump after release/7.1 branch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 17:10:35 +02:00
Michael Niedermayer
e1094ac45d
*/version.h: bump minor versions for release/7.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 17:07:30 +02:00
Michael Niedermayer
fde8637fda
avformat/asf: Check picsize
Fixes: signed integer overflow: 1073750247 * 2 cannot be represented in type 'int'
Fixes: 70722/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_O_fuzzer-5447231587549184

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 15:37:15 +02:00
James Almer
0dd6f1d5bf avformat/mov: fix setting index of LCEVC enhancement stream
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-23 23:11:12 -03:00
Jonathan Baudanza
6b3f9c2e92 avformat/rtpdec: fix integer overflow in start_time_realtime calculation
I encountered this problem with NTP timestamps that are extremely old,
like from January, 1990.

Although RFC3550 suggests that the timestamps in the RTCP packets use
the actual wallclock, some implementations use other clocks, such as
the CLOCK_MONOTONIC on linux.

I'm my case, I'm dealing with packets from mediasoup.

Without this patch, start_time_realtime shows up in the distance future
instead of around Jan 1900.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-23 17:08:33 +02:00
James Almer
5fa9c4e596 avformat/mov: support for LCEVC tracks
Co-authored-by: V-Nova Team <systems@v-nova.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-19 10:01:24 -03:00
James Almer
ba0ef0860f avformat: add an LCEVC stream group
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-19 10:01:02 -03:00
Michael Niedermayer
6be3786c82
avformat/mxfdec: Check timecode for overflow
Fixes: signed integer overflow: 9223372036840103968 + 538976288 cannot be represented in type 'long'
Fixes: 70604/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4844090340999168

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-19 00:43:22 +02:00
Michael Niedermayer
5a96aa435a
avformat/mxfdec: More offset_temp checks
Fixes: signed integer overflow: 9223372036854775807 - -1927491430256034080 cannot be represented in type 'long'
Fixes: 70607/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5282235077951488

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-19 00:39:21 +02:00
Michael Niedermayer
176db9db6e
avformat/flvdec: Free metaVideoColor
Fixes: memeleak
Fixes: 70659/clusterfuzz-testcase-minimized-ffmpeg_dem_KUX_fuzzer-4539872627458048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-19 00:24:27 +02:00
Tomas Härdin
665bf46ac2 lavf/mxfdec: Handle KLV fill 2024-09-18 21:43:06 +02:00
Tomas Härdin
8f2ba4333d lavf/mxfdec: Switch to mxf_metadata_read_table loop to FF_ARRAY_ELEMS, skip if read == NULL 2024-09-18 21:43:06 +02:00
James Almer
1c706cec46 avformat/mov_chan: add extra checks to channel description count
Make sure it's not zero, and equal or bigger than number of channels

Fixes: Timeout / DOS
Fixes: 67143/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-4858720481771520

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-17 15:41:45 -03:00
Marth64
8707c8660d avformat/dvdvideodec: implement seeking
Player applications can now enjoy seeking while playing back
a title. Accuracy is at the mercy of what libdvdnav exposes,
which is currently dvdnav_time_search().

Signed-off-by: Marth64 <marth64@proxyid.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-15 13:53:00 +02:00
sfan5
e66f977494 lavf/tls_mbedtls: restrict TLSv1.3 verification workaround to affected version
Now that mbedTLS 3.6.1 is released we know that only 3.6.0 contains this regression.

ref: c28e5b597e
Signed-off-by: sfan5 <sfan5@live.de>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-15 13:50:18 +02:00
jiangjie
f606872ed0 avformat/dashdec: The segments in dash file doesn't read completely when segment's size and duration is very small.
If the segment is very small, avformat_find_stream_info
will read all audio/video data in this segment.
cur->is_restart_needed is set to 0 later in dash_read_packet,
and no chance to be set to 1 again in the read_data function.

Reproduction:
ffmpeg -f lavfi -i mandelbrot -f lavfi -i anullsrc -c:v vp8 \
 -g 5 -r 5 -c:a libopus -use_template 0 -seg_duration 1 \
 -t 15 -y test_720.mpd
ffprobe -show_packets test_720.mpd
2024-09-14 11:42:09 +08:00
Marvin Scholz
6229e4ac42 avformat/mxfdec: narrow variable scopes 2024-09-13 19:48:15 +02:00
Marvin Scholz
f5107e79ce avformat/mxfdec: fix variable shadowing 2024-09-13 19:48:08 +02:00
Marvin Scholz
074bf9faf7 avformat/crypto: fix variable shadowing 2024-09-13 00:27:35 +02:00
Marvin Scholz
24711b00c6 avformat/network: use av_err2str to simplify code
No need to explicitly specify the buffer here as it is only
ever passed to av_log, so av_err2str can be used.
2024-09-13 00:26:53 +02:00
Nicolas Gaullier
59d2900df7 avformat/mxfenc: Fix guess frame_rate
The time_base was a bad guess.

Currently, fate-time_base test data assumed that overriding the input
time_base would affect the frame_rate, but this behaviour is not
documented, so just fix the fate data now that this is fixed.

Fix regression since 10185e2d4c:
previously, when streamcopying, the time_base was guessed from the
frame_rate considering it is often constant, so guessing the frame_rate
back from the time_base was often not a problem.

To reproduce:
ffmpeg -i fate-suite/mpeg2/dvd_still_frame.vob -an -c copy out.mxf

Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-04 13:01:37 +02:00
Marton Balint
a87a96105e avformat/libzmq: fix check for zmq protocol prefix
Fixes ticket #11134.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-09-02 22:51:17 +02:00
Marton Balint
90f68f7b2d avformat/mxfdec: disallow generic seek search
If the demuxer does not provide per-stream indexes, the generic seek search can
attempt to read the whole media file from the beginning when seeking. For large
MXF files this can cause huge lockups for a seek after the last timestamp,
which will eventually fail. So let's disable the generic seek for mxf, the
demuxer's own seek code should handle seeking just fine.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-09-02 22:50:52 +02:00
Stefano Mandelli
24eff5b547 avformat/rtsp: extend the PATH buffer to 2048
Recently, I have been experiencing an increasing number of user that use ffmpeg
to retrive RTSP stream from personal mediaproxies (e.g. MediaMtx) with
authorization based on JWT. The current length of PATH does not permit to
insert the token in the URL failing the authorization with no possibilities to
get the video.

VLC has just modified the RSTP max URL length, and it permits to use token
inside the URL.

For these reasons, I propose this patch to extend the PATH buffer from 1024 to
2048 in order to use tokens and the authorization process based on JWT.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-09-02 22:50:52 +02:00
Anton Khirnov
3f9ca51015 lavc/opus*: move to opus/ subdir 2024-09-02 11:56:53 +02:00
James Almer
a4228a0ac1 avformat/iamf_parser: use ffio_read_size() where useful
Signed-off-by: James Almer <jamrial@gmail.com>
2024-08-31 23:44:13 -03:00
Marvin Scholz
b6a0eab528 avformat/iamf_parse: Fix return of uninitialized value
The ret value here is not yet intialized so the return would return
uninitialized data. What was probably meant to be checked here was the
return value of ffio_read_size, which can return an error.

Introduced in 38bcb3ba7b

Fixes: CID1618758
Signed-off-by: James Almer <jamrial@gmail.com>
2024-08-31 21:21:39 -03:00
James Almer
fa5d3cc653 avformat/iamf_parse: use get_bits_long() to read the remaining AAC extradata bits
The output of put_bits_left() here can be as big as 27, which is a bit
count not supported by get_bits().

Fixes fate-iamf-stereo-demux when using --assert-level=2

Signed-off-by: James Almer <jamrial@gmail.com>
2024-08-31 14:51:32 -03:00
James Almer
38bcb3ba7b avformat/iamf_parse: fix parsing AAC DecoderConfigDescriptor
Use ff_mp4_read_descr() to read both the tags and the vlc value
that comes after it, which was not being taken into account.

Ref: https://github.com/AOMediaCodec/libiamf/issues/119

Signed-off-by: James Almer <jamrial@gmail.com>
2024-08-31 11:11:42 -03:00
James Almer
9d095f127a avformat/isom: make parameters used for loging a pointer to void
Signed-off-by: James Almer <jamrial@gmail.com>
2024-08-31 11:11:42 -03:00
Michael Niedermayer
4e39795c75 avformat/mvdec: Check if name was fully read
Fixes: use of uninitialized value
Fixes: 70901/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-6341913949569024

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