aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
Commit message (Collapse)AuthorAgeFilesLines
...
* avformat/movenc: fix setting elst/stss for IAMF with OpusFelicia Lim2025-04-141-0/+9
|
* avformat/iamf_writer: fix setting skip_samples and discard_padding for OPUSFelicia Lim2025-04-141-8/+17
|
* avformat/asf_tags: Deduplicate tagsAndreas Rheinhardt2025-04-132-5/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavf/id3v2dec: support multiple values and TIPL framesrcombs2025-04-071-21/+28
| | | | | | | | | | | | | Fixes https://trac.ffmpeg.org/ticket/6949 Ordinary text frames in ID3v2 are allowed to have multiple (null-separated) values. This technically isn't allowed in TXXX, but it's used in practice by Picard, and supporting it is harmless. TIPL/IPL (Involved People List) and TMCL (Musician Credits List) work similarly to TXXX, but alternate key-value-key-value. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/metadata: support duplicate keys in ff_metadata_convrcombs2025-04-071-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: Fix AV1 RTP wrong log conditionChris Hodges2025-04-031-1/+1
| | | | | | | | Fixed warning about OBU count being wrong, which can only be determined when the number of OBUs in the header is non-zero, not the other way round. Signed-off-by: Chris Hodges <chris.hodges@axis.com>
* avformat/rtpenc: Check dimensions during initAndreas Rheinhardt2025-03-311-8/+8
| | | | | | | Also fixes a -Wdeclaration-after-statement warning. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/rtpenc: Add flag AVFMT_NODIMENSIONS.Koushik Dutta2025-03-291-1/+9
| | | | | | | | | | | | | Not all rtp formats require the video dimensions to be available up front. H264 and HEVC will send them as stream parameters. The flag is restrictive and prevents RTP repacketization without parsing the codec information out of the stream. This change checks to see if the codec parameters are available on the rtp formats that need it. Signed-off-by: Koushik Dutta <koushd@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libs: bump major version for all librariesJames Almer2025-03-282-3/+3
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/dict: Unavpriv avpriv_dict_set_timestamp()Andreas Rheinhardt2025-03-288-12/+36
| | | | | | | And move it to lavf, its only user. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/version_major: postpone some deprecations until the next bumpJames Almer2025-03-281-2/+2
| | | | | | They are either too recent, or are not trivial to remove. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove deprecated FF_API_GET_DUR_ESTIMATE_METHODJames Almer2025-03-283-19/+0
| | | | | | Deprecated since 2024-03-06. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove deprecated FF_API_AVSTREAM_SIDE_DATAJames Almer2025-03-289-287/+0
| | | | | | Deprecated since 2023-10-06. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove deprecated FF_API_ALLOW_FLUSHJames Almer2025-03-2810-95/+2
| | | | | | Deprecated since 2023-10-02. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove deprecated FF_API_LAVF_SHORTESTJames Almer2025-03-286-56/+0
| | | | | | Deprecated since 2023-09-18. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: remove deprecated FF_API_TICKS_PER_FRAMEJames Almer2025-03-282-17/+0
| | | | | | Deprecated since 2023-05-15. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/nut: Add GBR(A)PF16/32LE/BEMichael Niedermayer2025-03-281-0/+8
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenccenc: add support for CENC AV1 encryptionJames Almer2025-03-258-7/+295
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: generalize sgpd_sync index lookupZhao Zhili2025-03-241-1/+1
| | | | | | The function has a nal_unit_type parameter but unused before. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avutil/libm: Only include intfloat.h when neededAndreas Rheinhardt2025-03-224-0/+4
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/hlsenc: fix CODECS Attribute hard code in hevc EXT-X-STREAM-INFJack Lau2025-03-191-3/+35
| | | | | | | | | | | fix ticket: 10786 parse the SPS from extradata and get profile_compatibility, tier, constraints which was been hard code before. HEVC CODECS Attribute reference to: ISO/IEC14496-15 Signed-off-by: Jack Lau <jacklau1222@qq.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/webvttdec: Add webvtt extension and MIME typesoftworkz2025-03-141-1/+2
| | | | | | | The webvtt extension is sometimes used in HLS playlists. Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* all: Fix doxy comments wrongly designated as trailing ///<Andreas Rheinhardt2025-03-121-1/+1
| | | | | | | | | | | The ///< or /**< form of doxygen comments are only to be used when the documentation follows the member and the comment block starts on the same line as the member. This commit fixes wrong uses of them; in particular, this fixes the comment for mb_height in H.264 SPS's structure which was wrongly added to mb_width. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/flvdec: Use appropriate error codeZhao Zhili2025-03-121-1/+1
| | | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
* avformat/flvdec: Fix error handling of parse_video_color_infoZhao Zhili2025-03-121-8/+14
| | | | | | | Some error should not be ignored. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
* avformat/flvdec: Use float for FLVMasteringMetaZhao Zhili2025-03-121-10/+10
| | | | | | | The precision should be enough for primaries and luminance. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
* avformat/flvdec: Use appropriate types in FLVMetaVideoColorZhao Zhili2025-03-121-9/+9
| | | | | | | This also reduce memory usage. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
* avformat/flvdec: Remove one level of indentationZhao Zhili2025-03-121-35/+31
| | | | | | | | Also remove the condition of AMF_DATA_TYPE_BOOL when parse color info. There is no AMF_DATA_TYPE_BOOL type in color info. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
* avformat/flvdec: Put FLVMetaVideoColor inside FLVContext directlyZhao Zhili2025-03-121-13/+24
| | | | | | | | | | | 1. Rename metaVideoColor to meta_color_info 2. Allocated FLVMetaVideoColor together with FLVContext 3. Improve the use of meta_color_info_flag. Do a sequence of strcmp only if meta_color_info_flag is FLV_COLOR_INFO_FLAG_PARSING. 4. Check return value of amf_parse_object(). Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
* avformat/flvdec: Fix use sizeof(AVMasteringDisplayMetadata)Zhao Zhili2025-03-121-6/+13
| | | | | | | | sizeof AVMasteringDisplayMetadata isn't part of ABI. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com>
* avcodec/put_bits: Add and use put_bits63()Andreas Rheinhardt2025-03-112-2/+2
| | | | | | | | | | | When using a 64bit PutBitContext (i.e. on x64), put_bits_no_assert() can naturally write up to 63 bits. So one can avoid treating the cases <32bits, 32 bits and <63 bits differently. As it turns out, no user actually wants to write 64 bit at once (maybe except testprograms). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* all: Use put_bytes_output() instead of put_bits_ptr - pb->bufAndreas Rheinhardt2025-03-102-5/+5
| | | | | | Avoids accessing internals of PutBitContext. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mpegenc, mpegts. mxfenc: Mark (de)muxers declarations as internalAndreas Rheinhardt2025-03-053-7/+10
| | | | | | | Otherwise compilers might emit code that presumes there to be a GOT which can't be fixed by the linker. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/rtp_av1: Add necessary headersAndreas Rheinhardt2025-03-041-4/+8
| | | | | | Also use a void* instead of an AVFormatContext as logctx in parse_leb. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/isom_tags: Add tag for AVS3Zhao Zhili2025-03-041-0/+2
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/movenc: Add AVS3 supportZhao Zhili2025-03-041-0/+36
| | | | | | | | 'avs3' is registered at mp4ra.org. The Avs3ConfigurationBox 'av3c' inside 'avs3' hasn't been registered yet, but is specified by the AVS3 spec. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/riffdec: change declaration of ff_get_wav_header()Viraaj Raulgaonkar2025-03-042-8/+8
| | | | | | | Change the type of logctx from void* to AVFormatContext*. This is in preparation for the next commit. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: fix overflow in corrected_dts calculationJames Almer2025-03-031-1/+1
| | | | | | | | Fixes: Integer-overflow Fixes: 400093647/clusterfuzz-testcase-minimized-media_metadata_parser_fuzzer-4794341562187776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/hls: Partially revert "reduce default max reload to 3"softworkz2025-03-011-1/+1
| | | | | | | | | | | | | | | | (setting to 100 as a reasonable compromise) The change has caused regressions for many users and consumers. Playlist reloads only happen when a playlist doesn't indicate that it has ended (via #EXT-X-ENDLIST), which means that the addition of future segments is still expected. It is well possible that an HLS server is temporarily unable to serve further segments but resumes after some time, either indicating a discontinuity or even by fully catching up. With a segment length of 3s, a max_reload value of 1000 corresponds to a duration of 50 minutes which appears to be a reasonable default. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: add AV1 RTP depacketizer and packetizerChris Hodges2025-02-2610-0/+996
| | | | | | | | | | | | | | | | | | | | | | | | | | Add RTP packetizer and depacketizer according to (most) of the official AV1 RTP specification. This enables streaming via RTSP between ffmpeg and ffmpeg and has also been tested to work with AV1 RTSP streams via GStreamer. It also adds the required SDP attributes for AV1. AV1 RTP encoding is marked as experimental due to draft specification status, debug amount reduced and other changes suggested by Tristan. Added optional code for searching the sequence header to determine the first packet for broken AV1 encoders / parsers. Stops depacketizing on corruption until next keyframe, no longer prematurely issues packet on decoding if temporal unit was not complete yet. Change-Id: I90f5c5b9d577908a0d713606706b5654fde5f910 Signed-off-by: Chris Hodges <chrishod@axis.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Make mime-type award a bonus probe scorePeter Zebühr2025-02-263-6/+6
| | | | | | | | | | | | | | | | This changes the default behaviour of ffmpeg where content-type headers on an input gives an absolut probe score (of 75) to instead give a bonus score (of 30). This gives the probe a better chance to arrive at the correct format by (hopefully) giving a large enough bonus to push edge cases in the right direction (MPEG-PS vs MP3, I am looking at you) while also not adversly punishing clearer cases (raw ADTS marked as "audio/mpeg" for example). This patch was regression tested against 20 million recent podcast submissions (after content-type propagation was added to original-storage), and 50k Juno vodcasts submissions (dito). No adverse effects observed (but the bonus may still need tweaking if other edge cases are detected in production).
* avformat/mp3dec: Subtract known padding from durationUlrik Mikaelsson2025-02-261-6/+14
| | | | | | | | | | | | | When an Info-tag is present, marking initial and trailing samples as padding, those samples should not be included in the calculation of track duration. This solves a surprising user experience where converting a WAV->MP3->WAV, ffprobe will show the duration of the mp3 as slightly longer than both the input and the output. As a result, the estimated duration and imprecise seek-results of some FATE-tests have been updated.
* GOL-1361: Remove invalid CTTS sample_offset checkekir2025-02-261-7/+0
| | | | | | We checked in this places: * In 8.6.1.3 of ISO/IEC 14496-12 about the CTTS box * In Apples MOV spec: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-SW19
* rtmp: Set correct message stream id when writing as serverJonathan Murray2025-02-261-1/+6
| | | | | | | | | | | | | rtmp_write is used both for writing outputs as a server. The rt->listen flag determines which mode we're running in. Previously, when running as a server, the message stream id would always be set to 0 for media/metadata messages. This is surprising given that we have both responded to "createStream()" with a value of 1 and sent a "Stream Begin 1" to the client. Furthermore, some client libraries (Red5) seem to trip up on receiving "@setDataFrame" on stream 0 (and may be correct to assume that this message would be sent on stream 1).
* avformat/flacdec: Return correct error-codes on read-failureUlrik2025-02-261-4/+12
| | | | | | | | | | | | | | | | | Forward errors from `avio_read` directly. When `avio_read` sees EOF before expected bytes can be read, consistently return `AVERROR_INVALIDDATA` We used to return `AVERROR(AVERROR_INVALIDDATA)` when failing to read metadata block headers. `AVERROR_INVALIDDATA` is already negative, so wrapping in `AVERROR` leads to double-negation. We used to return `AVERROR(EIO)` when failing to read extended metadata. However, many times, the IO-layer is not at fault, the input data is simply corrupted (truncated), so we return `AVERROR_INVALIDDATA` here as well. --- Tomas: changed to use AVERROR_EOF
* avformat/http: Return EIO for prematurely broken connectionUlrik2025-02-261-3/+10
| | | | | | | | | Currently, a prematurely broken connection normally leads to the same EOF, as a completed successful transfer. However, enabling reconnect changes this logic, and leads to the return of EIO. This patch unifies that logic, leading to the return of EIO for premature disconnect, regardless of setting of "reconnect".
* avformat/mov: (v4) fix get_eia608_packetPavel Koshevoy2025-02-231-11/+59
| | | | | | | | | The problem is reproducible with "Test for Quicktime 608 CC file.mov" from https://samples.ffmpeg.org/MPEG2/subcc/ ffmpeg -i "Test for Quicktime 608 CC file.mov" -map 0 -c copy -y remuxed.mov See https://trac.ffmpeg.org/ticket/11470
* avformat/iamf_parse: ensure there's at most one of each parameter types in ↵James Almer2025-02-191-3/+11
| | | | | | | | audio elements Should prevent potential memory leaks on invalid files. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/iamf_parse: add missing constrains for num_parameters in ↵James Almer2025-02-191-0/+6
| | | | | | | | audio_element_oub() Fixes ticket #11475. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/demux: don't discard empty Theora packetsJames Almer2025-02-191-1/+9
| | | | | | | | Theora signals "Output last frame again" with an empty packet. Finishes fixing ticket #11451. Signed-off-by: James Almer <jamrial@gmail.com>