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

26164 Commits

Author SHA1 Message Date
Anton Khirnov
86460a0342 lavf/flvdec: replace a private option with a field in FFFormatContext
The demuxer's 'missing_streams' private option is used to communicate
information from the demuxer to avformat_find_stream_info(). However,
that is not only unnecessarily complicated, it also leaks internal
information to users, e.g. this option appears in the results of the
fate-flv-demux test.

Use a new field in FFFormatContext to communicate this information
instead.
2024-10-16 16:46:29 +02:00
Anton Khirnov
31da5222a4 lavf: replace FFFormatContext.prefer_codec_framerate with FF_INFMT_FLAG
There is no reason for this to be a dynamic property, as the only
demuxer using this sets it unconditionally.
2024-10-16 16:46:29 +02:00
Anton Khirnov
12e5116872 lavf: deprecate av_format_inject_global_side_data()
This function would otherwise fail to build on the next major bump, as
inject_global_side_data is marked for removal.

It should also never be needed, as there is now a mechanism for
supplying global side data to decoders directly.
2024-10-16 16:46:25 +02:00
Anton Khirnov
cb80ec0b6c lavf: move demuxing-specific fields from FFFormatContext to FormatContextInternal 2024-10-16 16:29:12 +02:00
Anton Khirnov
6d05e7e314 lavf: move muxing-specific fields from FFFormatContext to FormatContextInternal 2024-10-16 16:29:12 +02:00
Anton Khirnov
772911d3a8 lavf: add new struct for data private to generic layer
Trivial for now, will become more useful in future commits, as many
fields from FFFormatContext should not be visible to individual
(de)muxers.
2024-10-16 16:29:12 +02:00
Anton Khirnov
461a359abc lavf: add a header for generic-layer interfaces
Analogous to what was previously done in avcodec and avfilter.
2024-10-16 16:29:12 +02:00
Anton Khirnov
de49452bc1 lavf/internal: remove a prototype for non-existent function
ff_stream_side_data_copy() has been gone since
5432d2aaca
2024-10-16 16:29:12 +02:00
James Almer
e347b4ff31 avformat/riff: map Y410 fourcc to RAWVIDEO decoder
md5 values change because the nut container now reports rawvideo as encoder
and Y410 as codec type instead of the bogus RGB[15].

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-13 20:44:09 -03: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
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
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
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
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
Martin Schitter
3cb648d569
libavformat/mxf: Add ULs for DNxUncompressed
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-09 18:19:25 +02:00
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