summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avformat/wavarc: Check if extradata has been fully readMichael Niedermayer2023-02-25
| | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 2df271c78cd4b7d481a2d34abb71a2450b43c7e2) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rka: Fix 1/0 with bps=1Michael Niedermayer2023-02-25
| | | | | | | | | | | | | | Fixes: division by zero Fixes: 55940/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6333107679920128 The decoder does not support bps=1 and i have no such sample so it is not known if this duration is correct. Alternatively we could error out on all bps we currently do not support on the decoder side or not set duration. Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit b3df7ca748bf28e41a6fcb6792b485d8eb04b36a) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Check samplesize and offset to avoid integer overflowMichael Niedermayer2023-02-25
| | | | | | | | | | Fixes: signed integer overflow: 9223372036854775584 + 536870912 cannot be represented in type 'long' Fixes: 55844/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-510613920664780 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 53c1f5c2e28e54ea8174b196d5cf4a158907395a) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mpegtsenc: re-emit extradata ahead of IDR pictures even if AUD is ↵John Coiner2023-02-19
| | | | | | | | | | | | | | | | | | | already present Current mpegtsenc code only inserts SPS/PPS from extradata before IDR frames if AUD is also inserted. Unfortunately some encoders may preface a key frame with an AUD, but no SPS/PPS. In that case current code does not repeat the "extradata" and the resulting HLS stream may become noncompliant and unjoinable. Fix this by always inserting SPS/PPS and moving AUD to the beginning of the packet if it is already present. Fixes ticket #10148. Signed-off-by: Marton Balint <cus@passwd.hu> (cherry picked from commit e0cb89c354ea654bccc524a8a45321b93cb256d3)
* version.h: Bump minor for 6.0 branchMichael Niedermayer2023-02-19
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/flvenc: fix EOS tagZhao Zhili2023-02-19
| | | | | | | | | | FLV spec only has AVC end of sequence tag, and the EOS tag has a CodecID as other video data packet. MPEG4 doesn't conformance to the spec, but it's there for a decade. So only 'fix' the EOS tag rather than remove it completely. Reviewed-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/cdg: add probePaul B Mahol2023-02-18
|
* avformat: deprecate AVFormatContext io_close callbackMarton Balint2023-02-16
| | | | | | io_close2 should be used instead. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/rka: improve probingPaul B Mahol2023-02-14
|
* avformat/movenc: allow writing out channel count in MP4 and 3GPJan Ekström2023-02-14
| | | | | | | | | | | | | | | | | | | ISOBMFF (14496-12) made this field ('channelcount') in the AudioSampleEntry structure non-template¹ somewhere before the release of the 2022 edition. As for ETSI TS 126 244 AKA 3GPP file format (V16.1.0, 2020-10), it does not seem contain any references limiting the channelcount entry in AudioSampleEntry or in its own definition of EVSSampleEntry. fate-mov-mp4-chapters test had to be adjusted as it output a mono vorbis stream, which would now be properly marked as such in the container. 1: As per 14496-12: Fields shown as “template” in the box descriptions are fields which are coded with a default value unless a derived specification defines their use and permits writers to use other values than the default.
* avformat: add RKA demuxerPaul B Mahol2023-02-11
|
* avformat: add SDNS demuxerPaul B Mahol2023-02-11
|
* avformat/wavarc: demux only data chunk contentPaul B Mahol2023-02-09
|
* Bump major versions of all librariesJames Almer2023-02-09
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/version: postpone the remaining API deprecationsJames Almer2023-02-09
| | | | | | They are either too recent, or still need work like FF_API_COMPUTE_PKT_FIELDS2. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/{color_utils, csp}: merge color_utils into csp and expose APILeo Izen2023-02-09
| | | | | | | | | | | | | | | | | | | | | | | | libavutil/color_utils contains some avpriv_ symbols that map enum AVTransferCharacteristic values to gamma-curve approximations and to the actual transfer functions to invert them (i.e. -> linear). There's two issues with this: (1) avpriv is evil and should be avoided whenever possible (2) libavutil/csp.h exposes a public API for handling color that already handles primaries and matricies I don't see any reason this API has to be private, so this commit takes the functionality from avutil/color_utils and merges it into avutil/csp with an exposed av_ API rather than the previous avpriv_ API. Every reference to the previous API has been updated to point to the new one. color_utils.h has been deleted as well. This should not break any applications as it only contained avpriv_ symbols in the first place, so nothing in that header could be referenced by other applications. Signed-off-by: Leo Izen <leo.izen@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat: remove FF_API_AVSTREAM_CLASSJames Almer2023-02-09
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove FF_HLS_TS_OPTIONSJames Almer2023-02-09
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove FF_API_AVIOCONTEXT_WRITTENJames Almer2023-02-09
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: remove FF_API_LAVF_PRIV_OPTJames Almer2023-02-09
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: remove FF_API_AVCTX_TIMEBASEJames Almer2023-02-09
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avformat: Move AVOutputFormat internals out of public headerAndreas Rheinhardt2023-02-09
| | | | | | | | | | | | | | This commit does for AVOutputFormat what commit 20f972701806be20a77f808db332d9489343bb78 did for AVCodec: It adds a new type FFOutputFormat, moves all the internals of AVOutputFormat to it and adds a now reduced AVOutputFormat as first member. This does not affect/improve extensibility of both public or private fields for muxers (it is still a mess due to lavd). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat/demux: Avoid stack packet when decoding frameAndreas Rheinhardt2023-02-09
| | | | | | | Possible now that avcodec_decode_subtitle2() accepts a const AVPacket*. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat/avformat: Move codecpar up in AVStreamAndreas Rheinhardt2023-02-09
| | | | | | | | | It is the most commonly used field and moving it to the start e.g. allows to encode the offset in a pointer+offset addressing mode on one byte on x86. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat/avformat: Remove AVOutputFormat.data_codecAndreas Rheinhardt2023-02-09
| | | | | | | No AVOutputFormat has this set. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat/hls: Add option to retry failed segments for hlsgnattu2023-02-09
| | | | | | | | | | | Current HLS implementation simply skip a failed segment to catch up the stream, but this is not optimal for some use cases like livestream recording. Add an option to retry a failed segment to ensure the output file is a complete stream. Signed-off-by: gnattu <gnattuoc@me.com> Reviewed-by: Steven Liu <liuqi05@kuaishou.com>
* avcodec/wavarc: add support for 0CPYPaul B Mahol2023-02-07
|
* avcodec/wavarc: fix 8bit decodingPaul B Mahol2023-02-06
|
* avformat/lafdec: check for not supported bppPaul B Mahol2023-02-04
|
* avformat/lafdec: error out on partial packet header readPaul B Mahol2023-02-04
|
* avformat: add WavArc demuxerPaul B Mahol2023-02-04
|
* libavformat/lafdec: free dataMichael Niedermayer2023-02-01
| | | | | | Fixes: memleak Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/lafdec: Check if all data was readMichael Niedermayer2023-02-01
| | | | | | | | Fixes: OOM Fixes: 54572/clusterfuzz-testcase-minimized-ffmpeg_dem_LAF_fuzzer-4974038870523904 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mov: Reduce the verbosity of the warning about fragmented MP4 vs advanced ↵Martin Storsjö2023-01-31
| | | | | | | | | | | | | | | | | | | | | edit lists Only warn if the advanced_editlist option is enabled (it is enabled by default though) so we don't print one warning for each track, and demote the warning to AV_LOG_LEVEL_VERBOSE; this message does get generated whenever parsing a fragmented MP4 file, regardless of whether the file actually uses multiple edits or not. Later when parsing the mov structures, the demuxer does warn if the file did contain multiple edits which would require the advanced_editlist option enabled for decoding correctly. Adjust the warning message for the case when the file seemed like it actually would have needed handling of advanced edit lists, to reflect the fact that it doesn't help to try set the option as it has been automatically disabled. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: add XMD demuxerPaul B Mahol2023-01-30
|
* avformat/mxfdec: check number of index table entires more strictlyMarton Balint2023-01-29
| | | | | | | | | | | Let's ignore the index table if the number of index entries does not match the index duration (or the special AVID index entry counts). Fixes: OOM Fixes: 50551/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-6607795234930688 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: support Avid files with an extra index entryMarton Balint2023-01-29
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: check index entry array sizeMarton Balint2023-01-29
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec: add CBD2 DPCM decoderPaul B Mahol2023-01-27
|
* avformat/teeproto: setup max_packet_sizeZhao Zhili2023-01-26
| | | | | | | | | | | It's the minimum of all child protocols max_packet_size. Can be used like this: ffmpeg -re -i cctv.mp4 -c copy -f mpegts \ -protocol_whitelist 'tee,file,udp' \ 'tee:out.ts|udp://127.0.0.1:6666?pkt_size=1316' Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/bonk: remove unused variablePaul B Mahol2023-01-25
|
* avformat: add WADY demuxerPaul B Mahol2023-01-24
|
* avformat/segment: calculate segment durations correctly.Gyan Doshi2023-01-16
| | | | | | | | | segment_time and segment_times are defined as duration specifications, not timestamps, so calculation of segment duration must account for initial timestamp. Fixed. FATE ref for segment-mp4-to-ts changed on account of avoiding premature segment cut at the end of the first segment.
* avformat/dtshddec: also read trailing padding in samplesPaul B Mahol2023-01-16
|
* lavf/spdifdec: support EAC3rcombs2023-01-13
| | | | | | Parsing should probably be enabled for all codecs, at least for headers, but e.g. the AAC parser produces 1-byte packets of zero padding with it, so I'm just enabling it for EAC3 for the moment.
* libavformat/dashenc: Enable HTTP persistent connections for dashenc_delete_fileBasel Sayeh2023-01-13
| | | | | | | | | | | Removed the unnecessary calls to ff_format_io_close this patch introduced in dashenc_delete_file. dashenc_delete_file functions open a new HTTP connection regardless of the http_persistent value, So change their behaviour to keep http connections open if http_persistent is set. Signed-off-by: Basel Sayeh <basel.sayeh@hotmail.com>
* libavformat/hlsenc: Enable HTTP persistent connections for hls_delete_fileBasel Sayeh2023-01-13
| | | | | | | | | | | Removed the unnecessary calls to ff_format_io_close this patch introduced in hls_delete_file. hls_delete_file functions open a new HTTP connection regardless of the http_persistent value, So change their behaviour to keep http connections open if http_persistent is set Signed-off-by: Basel Sayeh <basel.sayeh@hotmail.com>
* avformat/movenc: Add loop parameter to animated AVIFVignesh Venkatasubramanian2023-01-13
| | | | | | | | | | | | | | | | | | | | | | | The HEIF specification permits specifying the looping behavior of animated sequences by using the EditList (elst) box. The track duration will be set to the total duration of all the loops (or infinite) and the duration of a single loop will be set in the edit list box. The default behavior is to loop infinitely. Compliance verification: * This was added in libavif recently [1] and the files produced by ffmpeg after this change have EditList boxes similar to the ones produced by libavif (and avifdec is able to parse the loop count as intended). * ComplianceWarden is ok with the produced files. * Chrome is able to play back the produced files. [1] https://github.com/AOMediaCodec/libavif/commit/4d2776a3af53ae1aefdaed463b75ba12fd9cf8c2 Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/movenc: Add movie_timescale option to AVIFVignesh Venkatasubramanian2023-01-13
| | | | | | | | | | | | | Allow specifying the movie_timescale options to AVIF ouptut. This also makes sure that when movie_timescale is not specified, the default value of 1000 is used instead of 0. Animated AVIF files which don't specify the movie_timescale will have the correct duration written in the track and movie headers after this change (instead of writing 0). Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/nsvdec: add support for STARDIVA formatPaul B Mahol2023-01-12
|