summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avformat: Switch AVChapter.id to 64bitsAndreas Rheinhardt2021-04-27
| | | | | | | Announced in e318438f2f30525d8baca2b5683aa9898d0c56f7. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Remove deprecated av_demuxer_open()Andreas Rheinhardt2021-04-27
| | | | | | | Deprecate in e37f161e66e042d6c2c7470c4d9881df9427fc4a. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Remove deprecated AVFMT_FLAG_MP4A_LATM flag, latm optionAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in 67747c89ad4d3bfb4381c3d274603a4f0da773d8. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashenc: Remove deprecated min_seg_duration optionAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in 01ba52852d2ada3c79fe02a7de5bc1fdc27d56e8. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rtsp: Remove deprecated old options, rename stimeout->timeoutAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in ff46124b0df17a1d35249e09ae8eae9a61f16e04. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/aviobuf: End grace period of allowing 0 from read_packetAndreas Rheinhardt2021-04-27
| | | | | | | See a606f27f4c610708fa96e35eed7b7537d3d8f712. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov, movenc: Stop exporting rotation via metadataAndreas Rheinhardt2021-04-27
| | | | | | | | | | | Deprecated in ddef3d902f0e4cbd6be6b3e5df7ec158ce51488b. (The reference file of the mov-zombie test needed to be updated, because a rotate metadata tag is no longer exported; the side-data is of course still present.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Remove remnants of side data mergingAndreas Rheinhardt2021-04-27
| | | | | | | | Deprecated in d682ae70b4b3a53fb73ec30281f9f4cfbc531edd, ineffective since ca4df37f06f8a47651c67693b4851ed8d7e3ef74. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/hlsenc: Remove deprecated localtime optionsAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in fbd8746efabe441469eb410d2ffa6af64987ca80. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/hlsenc: Remove deprecated wrap optionAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in d96ebc5ef88024869de06bcf92b2ad99b01d47e3. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/http: Remove deprecated "user-agent" optionAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in 27714b462d1bff9e9b40fbdabb39f58e79032b81. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avformat: Remove outdated private fieldsAndreas Rheinhardt2021-04-27
| | | | | | | | Affected function pointers (always NULL) in AVInputFormat, AVOutputFormat as well as private fields of AVStream. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Remove deprecated filename field from AVFormatContextAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in fa8308d3d4f27d6fb38ac2069887a7b259f1c6ab. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Remove getters and settersAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Remove deprecated old open callbacksAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Remove FFserver leftoversAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Constify the API wrt AV(In|Out)putFormatAndreas Rheinhardt2021-04-27
| | | | | | | Also constify AVProbeData. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Switch AVCPBProperties to 64bitsAndreas Rheinhardt2021-04-27
| | | | | | | | | | | Announced in 2e8b0446c6798947dac77fee4a06f9c4e8131ab5. Two FATE-tests needed to be updated because the checksums of side data containing an AVCPBProperties struct changed. buffer_size has also been switched to 64bits because it is a bitsize. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec, avformat: Remove AVPacket.convergence_durationAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in 948f3c19a8bd069768ca411212aaf8c1ed96b10d. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec, avformat: Remove old BSF APIAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Remove next API for AV(In|Out)putFormatAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dtsenc: reindentGyan Doshi2021-04-27
|
* avformat/adtsenc: clarify option helpGyan Doshi2021-04-27
| | | | Also remove unnecessary unit as option does not accept any constants.
* avformat/westwood_audenc: Remove unused variableAndreas Rheinhardt2021-04-26
| | | | | Reviewed-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/westwood_audenc: Check for, not assert on invalid dataAndreas Rheinhardt2021-04-26
| | | | | Reviewed-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/ttmlenc: enable writing out additional header valuesJan Ekström2021-04-26
| | | | | | | | | | This way the encoder may pass on the following values to the muxer: 1) Additional root "tt" element attributes, such as the subtitle canvas reference size. 2) Anything before the body element of the document, such as regions in the head element, which can configure styles. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* avformat/westwoodaudenc: Adds muxer for Westwood AUD format.Aidan Richmond2021-04-26
| | | | | | | | Format is still used by modders of these old games. Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Aidan Richmond <aidan.is@hotmail.co.uk> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* libavformat/adtsenc: Increase ADTS_MAX_FRAME_BYTES from 8k to 16kChris Ribble2021-04-25
| | | | | | | ADTS frames may contain up to 768 bytes per channel. With 16 channels, this is 12k, which cannot fit into the maximum 8k buffer. Signed-off-by: Chris Ribble <chris.ribble@resi.io>
* avformat/asfdec_o: Use ff_get_extradata()Michael Niedermayer2021-04-24
| | | | | | | | Fixes: OOM Fixes: 27240/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_O_fuzzer-5937469859823616 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/id3v2: Check end for overflow in id3v2_parse()Michael Niedermayer2021-04-23
| | | | | | | | Fixes: signed integer overflow: 9223372036840103978 + 67637280 cannot be represented in type 'long' Fixes: 33341/clusterfuzz-testcase-minimized-ffmpeg_dem_DSF_fuzzer-6408154041679872 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: Fix file position additionMichael Niedermayer2021-04-22
| | | | | | | | Fixes: signed integer overflow: 9223372036854775805 + 4 cannot be represented in type 'long' Fixes: 29927/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5579985228267520 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/wtvdec: Improve size overflow checks in parse_chunks()Michael Niedermayer2021-04-22
| | | | | | | | | Fixes: signed integer overflow: 32 + 2147483647 cannot be represented in type 'int Fixes: 32967/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-5132856218222592 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: check for pts overflow in mov_read_sidx()Michael Niedermayer2021-04-22
| | | | | | | | Fixes: signed integer overflow: 9223372036846336888 + 4278255871 cannot be represented in type 'long' Fixes: 32782/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6059216516284416 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/cafdec: Check channelsMichael Niedermayer2021-04-20
| | | | | | | | Fixes: signed integer overflow: -1184429040541376544 * 32 cannot be represented in type 'long' Fixes: 31788/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6236746338664448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/hls: check return value of new_init_section()Marton Balint2021-04-18
| | | | | | Fixes part of ticket #8931. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/utils: Combine identical statementsAndreas Rheinhardt2021-04-18
| | | | | | | | | | | This would only make a difference in case the first attempt to initialize the encoder failed and the second succeeded. The only reason I can think of for this to happen is that the options (in particular the codec whitelist) are not used for the second try and that obviously implies that we should not even try a second time to open the decoder. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Remove unnecessary function callsAndreas Rheinhardt2021-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ffio_fill() is used when initially writing unknown length elements; yet it can happen that the amount of bytes written by it is zero in which case it is of course unnecessary to ever call it. Whether it is possible to know this during compiletime depends upon how aggressively the compiler inlines function calls (i.e. if it inlines calls to start_ebml_master() where the upper bound for the size of the element implies that the size will be written on one byte) and this depends upon optimization settings. It is not the aim of this patch to inline all calls where it is known that ffio_fill() will be unnecessary, but merely to make compilers that inline such calls aware of the fact that writing zero bytes with ffio_fill() is unnecessary. To this end av_builtin_constant_p() is used to check whether the size is a compiletime constant. For GCC 10 this made a difference at -O3 only: The size of .text decreased from 0x747F (with 29 calls to ffio_fill(), eight of which use size zero) to 0x7337 (with 21 calls to ffio_fill(), zero of which use size zero). For Clang 11 it made a difference at -O2 and -O3: At -O2, the size of .text decreased from 0x879C to 0x871C (with eight calls to ffio_fill() eliminated); at -O3 the size of .text decreased from 0xAF2F to 0xAEBF. Once again, eight calls to ffio_fill() with size zero have been eliminated. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/wavdec: Fix reading files with id3v2 apic before fmt tagAndreas Rheinhardt2021-04-18
| | | | | | | | | | | | | Up until now the cover images will get the stream index 0 in this case, violating the hardcoded assumption that this is the index of the audio stream. Fix this by creating the audio stream first; this is also in line with the expectations of ff_pcm_read_seek() and ff_spdif_read_packet(). It also simplifies the code to parse the fmt and xma2 tags. Fixes #8540; regression since f5aad350d3695b5b16e7d135154a4c61e4dce9d8. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/segment: Use ff_stream_encode_params_copy()Andreas Rheinhardt2021-04-18
| | | | | | It is simpler and more complete (e.g. it copies the id). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/webm_chunk: Use ff_stream_encode_params_copy()Andreas Rheinhardt2021-04-18
| | | | | | | It is simpler and more complete (e.g. it copies the framerate information which allows to write the default duration element). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/id3v2: Don't reverse the order of id3v2 APICsAndreas Rheinhardt2021-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When parsing ID3v2 tags, special (non-text) metadata is not applied directly and unconditionally; instead it is stored in a linked list in which elements are prepended. When traversing the list to add APICs (or private tags) at the end, the order is reversed. The same also happens for chapters and therefore the chapter parsing code already reverses the chapters. This commit changes this: By keeping pointers to both head and tail of the linked list one can preserve the order of the entries and remove the reordering code for chapters. Only the pointer to head will be exported: No current caller uses a nonempty list, so exporting both head and tail is unnecessary. This removes the functionality to combine the lists of special metadata read from different ID3v2 tags, but that doesn't make really much sense anyway (and would be trivial to implement if desired) and allows to remove the now unnecessary initializations performed by the callers. The FATE-reference for the id3v2-priv test had to be updated because the order of the tags read into the dict is reversed; for id3v2-priv-remux only the md5 and not the ffprobe output of the remuxed file changes because the order of the private tags has up until now been reversed twice. The references for the aiff/mp3 cover-art tests needed to be updated, because the order of the attached pics is reversed upon reading. It is still not correct, because the muxers write the pics in the order in which they arrive at the muxer instead of the order given by pkt->stream_index. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aiffenc: Avoid seek when writing id3v2 tags at the endAndreas Rheinhardt2021-04-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aiffenc: Remove always-false checkAndreas Rheinhardt2021-04-18
| | | | | | | write_header() already checks that there are only video tracks besides the one audio track. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mpegts: set correct extradata size for Opus streamsJames Almer2021-04-16
| | | | | | | map_type 0 is always 19 bytes, whereas map_type 1 and 255 are 21 + channel count bytes. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mpegts: add missing sample_rate value to Opus extradataJames Almer2021-04-16
| | | | | | Finishes fixing ticket #9190. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: fix writing dOps atomsJames Almer2021-04-16
| | | | | | | | | | | | Don't blindly copy all bytes in extradata past ChannelMappingFamily. Instead check if ChannelMappingFamily is not 0 and then only write the correct amount of bytes from ChannelMappingTable, as defined in the spec[1]. Fixes part of ticket #9190. [1] https://opus-codec.org/docs/opus_in_isobmff.html#4.3.2 Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/webpenc: don't assume animated webp streams will have more than one ↵James Almer2021-04-16
| | | | | | | | | | | | | packet The libwebp_animencoder returns a single packet with the entire animated stream, as that's what the external library produces. As such, only ensure the stream was produced by said encoder (or propagated by a demuxer, once support is added) when attempting to write the requested loop value. Fixes ticket #9179. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rawenc: remove singlejpeg muxerGyan Doshi2021-04-16
| | | | | It was added in 51ac1f616f due to ticket #4218, in order to show a single image via ffserver. With ffserver long gone, it serves no purpose.
* mov: Prioritize aspect ratio values found in pasp atomVittorio Giovara2021-04-15
| | | | | | | | | | | | | From the ISO/IEC specification for MP4: The pixel aspect ratio and clean aperture of the video may be specified using the ‘pasp’ and ‘clap’ sample entry boxes, respectively. These are both optional; if present, they over-ride the declarations (if any) in structures specific to the video codec, which structures should be examined if these boxes are absent. For maximum compatibility, these boxes should follow, not precede, any boxes defined in or required by derived specifications. Fixes trac/#7277.
* avformat/dashdec: Also fetch final partial segmentMatt Robinson2021-04-14
| | | | | | | | | | Currently, the DASH demuxer omits the final segment for a non-live stream (using SegmentTemplate) if it is shorter than the other segments. Correct calc_max_seg_no to round up when calulating the number of segments instead of rounding down to resolve this issue. Signed-off-by: Matt Robinson <git@nerdoftheherd.com>