summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avformat/icecast: Add option to use TLS connectionMarvin Scholz2020-07-02
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/hlsenc: simplify code to pass s directlyLimin Wang2020-07-02
| | | | | Suggested-by: Nicolas George <george@nsup.org> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/hlsenc: fix av_bprint_finalize() usageLimin Wang2020-07-02
| | | | | | | Don't need to do double check by the description of the API. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/hlsenc: use proper error codesLimin Wang2020-07-02
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/au: check return value of au_read_annotation()Limin Wang2020-07-02
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/au: check return value of av_bprint_finalize()Limin Wang2020-07-02
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/dump: add a \n for end of ERROR logLimin Wang2020-07-02
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/hevc: Defer initializations in ff_isom_write_hvcc()Andreas Rheinhardt2020-07-02
| | | | | | | Saves initialization of an HEVCDecoderConfigurationRecord when the data is already in ISOBMFF-format or if it is plainly invalid. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mov: fix memleaksZhao Zhili2020-07-01
| | | | | | | | Fix two cases of memleaks: 1. The leak of dv_demux 2. The leak of dv_fctx upon dv_demux allocate failure Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* libavformat/mov: Fix memleaks when demuxing DV audioAndreas Rheinhardt2020-07-01
| | | | | | | | | | | | | | | | | | | | | The code for demuxing DV audio predates the introduction of refcounted packets and when the latter was added, changes to the former were forgotten. This meant that when avpriv_dv_produce_packet initialized the packet containing the AVBufferRef, the AVBufferRef as well as the underlying AVBuffer leaked; the actual packet data didn't leak: They were directly freed, but not via their AVBuffer's free function. https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket4671/dir1.tar.bz2 contains samples for this (enable_drefs needs to be enabled for them). Moreover, errors in avpriv_dv_produce_packet were ignored; this has been changed, too. Furthermore, in the hypothetical scenario that the track has a palette, this would leak, too, so reorder the code so that the palette code appears after the DV audio code. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/utils: reorder duration computation to avoid overflowMichael Niedermayer2020-07-01
| | | | | | | | Fixes: signed integer overflow: 8 * 9223372036854774783 cannot be represented in type 'long' Fixes: 23381/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4818340509122560 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: Pass a copy of the URL for probingMichael Niedermayer2020-07-01
| | | | | | | | | | The segments / url can be modified by the io read when reloading This may be an alternative or additional fix for Ticket8673 as a further alternative the reload stuff could be disabled during probing Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/isom: add comment to mov_mdhd_language_mapZhao Zhili2020-07-01
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/dump: Use intermediate pointer for access to programs arrayAndreas Rheinhardt2020-06-30
| | | | | | | Improves readability. Reviewed-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/dump: Use const where appropriateAndreas Rheinhardt2020-06-30
| | | | | | | | Also switch to using a pointer to access stream side data instead of copying the stream's AVPacketSideData. Reviewed-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavf/movenc: Use a dynamic buffer when writing the mfra boxDerek Buitenhuis2020-06-28
| | | | | | | | | | | When doing streamed output, with e.g. +dash, if the mfra box ended up being larger than the AVIOContext write buffer, the (unchecked) seeking back to update the box size would silently fail and produce an invalid mfra box. This is similar to how other boxes are written in fragmented mode. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avformat/smoothstreaming: Add deinit functionAndreas Rheinhardt2020-06-27
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/smoothstreaming: Don't write trailer of subcontextAndreas Rheinhardt2020-06-27
| | | | | | | | | | Nothing written in avformat_write_trailer() for the submuxers will be output anyway because the AVIOContexts used for actual output have been closed before the call. Writing the trailer of the subcontext has probably only been done in order to free the memory allocated by the submuxer. And this job has been taken over by the deinit functions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mvdec: Fix integer overflow with billions of channelsMichael Niedermayer2020-06-27
| | | | | | | | Fixes: signed integer overflow: 1394614304 * 2 cannot be represented in type 'int' Fixes: 23491/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5697377020411904 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/avc, mxfenc: Avoid allocation of H264 SPS structure, fix memleakAndreas Rheinhardt2020-06-26
| | | | | | | | | | | | | | | | | | | | | | Up until now, ff_avc_decode_sps would parse a SPS and return some properties from it in a freshly allocated structure. Yet said structure is very small and completely internal to libavformat, so there is no reason to use the heap for it. This commit therefore changes the function to return an int and to modify a caller-provided structure. This will also allow ff_avc_decode_sps to return better error codes in the future. It also fixes a memleak in mxfenc: If a packet contained multiple SPS, only the SPS structure belonging to the last SPS would be freed, the other ones would leak when the pointer is overwritten to point to the new SPS structure. Of course, without allocations there are no leaks. This is Coverity issue #1445194. Furthermore, the SPS structure has been renamed from H264SequenceParameterSet to H264SPS in order to avoid overlong lines. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/avc: Don't use ff_ prefix for static functionAndreas Rheinhardt2020-06-26
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webvttdec: Accept \r as newlineAndreas Rheinhardt2020-06-26
| | | | | | | | | | | | | After parsing the end timestamp of a WebVTT cue block, the current code skips everything after the start of the timestamp that is not a \t, ' ' or \n and treats what is next as the start of a WebVTT cue settings list. Yet if there is no such list, but a single \r, this will skip a part of the cue payload (namely everything until the first occurence of \t, ' ' or \n) and treat what has not been skipped as the beginning of the WebVTT cue settings list that extends until the next \r or \n (or the end). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/av1: Avoid using dynamic buffer when assembling av1cAndreas Rheinhardt2020-06-26
| | | | | | | | | Given that AV1 only has exactly one sequence header, it is unnecessary to copy the content of said sequence header into an intermediate dynamic buffer; instead the sequence header can be copied from where it is in the input buffer. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/microdvddec: skip malformed lines without frame number.Michael Niedermayer2020-06-25
| | | | | | | | | Fixes: signed integer overflow: 1 - -9223372036854775808 cannot be represented in type 'long' Fixes: 23490/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5133490093031424 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/libamqp: add option delivery_modeLevis Florian2020-06-24
| | | | | Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com> Signed-off-by: Levis Florian <levis.florian@gmail.com>
* avformat/smoothstreaming: Forward errors from copying white/blacklistsAndreas Rheinhardt2020-06-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/sccdec: Avoid variable that is always zeroAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/pjsdec: Avoid variable that is always zeroAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mpl2dec: Avoid variable that is always zeroAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mov: CosmeticsAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mov: Avoid allocation when reading ddts atomAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mov: Use ffio_read_size where appropriateAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mov: Avoid allocation+copy when moving extradataAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mov: Read attached pics directly into st->attached_picAndreas Rheinhardt2020-06-22
| | | | | | | | | | Given that av_get_packet returns a blank packet on error, the only difference to the current approach (that uses intermediate AVPackets on the stack) is that st->attached_pic will be properly initialized on error (i.e. the timestamps are AV_NOPTS_VALUE) whereas right now st->attached_pic is only zeroed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mov: Check earlier whether reel_name string is emptyAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec, avformat: Remove unnecessary initializations of side data sizeAndreas Rheinhardt2020-06-22
| | | | | Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/avformat: Improve documentation of av_stream_get_side_dataAndreas Rheinhardt2020-06-22
| | | | | | | | Document that it also sets the size in case the desired side data is absent (if the pointer has been supplied). Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/flvdec: CosmeticsAndreas Rheinhardt2020-06-22
| | | | | Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/dashenc: Calculate average bitrate for adaptation sets in static ↵Przemysław Sobala2020-06-22
| | | | | | | | | manifest If stream's bitrate is not specified: - for static manifest: an average bitrate will be calculated and used, - for dynamic manifest: first segment's bitrate will be calculated and used, as before, for bandwidth setting in adaptation sets.
* Revert "avformat/dashenc: use AVStream timebase when computing missing bitrate"Przemysław Sobala2020-06-22
| | | | This reverts commit 2a9ffd89fcb09bd69b2130da039ad2caba79cf33 as duration is always in AV_TIME_BASE units
* avformat/dvenc: return error code of dv_assemble_frame()Limin Wang2020-06-19
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat: add MCC demuxerPaul B Mahol2020-06-18
| | | | Fixes #7680
* avformat/sccdec: make splitting more robustPaul B Mahol2020-06-18
|
* lavf/dashdec: Add missed side data/dispositionJun Zhao2020-06-18
| | | | | | | | dash demuxer get the stream info from sub-stream, but missed side data/disposition part, e,g, missed the DOVI side data when the stream is Dolby Vision streams Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/hls: Add missed side data/dispositionvacingfang2020-06-18
| | | | | | | | | hls demuxer get the stream info from sub-stream, but missed side data/disposition part, e,g, missed the DOVI side data when the stream is Dolby Vision streams. Reviewed-by <liuqi05@kuaishou.com> Signed-off-by: vacingfang <vacingfang@tencent.com>
* avformat/apm: check codec tag in probe and add constantZane van Iperen2020-06-17
| | | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: Write 'av01' as a compatible brand when muxing AV1Derek Buitenhuis2020-06-17
| | | | | | | | | This is a requirement of the AV1-ISOBMFF spec. Section 2.1. General Requirements & Brands states: * It SHALL have the av01 brand among the compatible brands array of the FileTypeBox Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avformat/sccdec: simplify demuxer a littlePaul B Mahol2020-06-17
|
* avformat/sccdec: unbreak previous commits to this filePaul B Mahol2020-06-15
|
* avformat/movenc: fix remuxing eia-608 into mov from other containersPaul B Mahol2020-06-15
|