aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
Commit message (Collapse)AuthorAgeFilesLines
* Bump minor versions after release branchn4.5-devMichael Niedermayer2021-03-201-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump Versions before release/4.4 branchMichael Niedermayer2021-03-201-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Check offset addition for overflowMichael Niedermayer2021-03-191-2/+9
| | | | | | | | Fixes: signed integer overflow: 9223372036854775807 + 536870912 cannot be represented in type 'long' Fixes: 31678/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5614204619980800 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rtsp: support buffer_size and pkt_size options for RTPJiangjie Gao2021-03-191-1/+4
| | | | | | | | | And forward it to the underlying UDP protocol. Fixes ticket #7517. Signed-off-by: Jiangjie Gao <gaojiangjie@live.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/libsrt: fix help messageZhao Zhili2021-03-191-1/+1
| | | | | | SRTO_TLPKTDROP works for receiver and sender both. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/libsrt: fix setsockopt() typoZhao Zhili2021-03-191-1/+1
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/http,tls: honor http_proxy command line variable for HTTPSMoritz Barsnick2021-03-193-2/+10
| | | | | | | | | | | | | | | | | | Add the "http_proxy" option and its handling to the "tls" protocol, pass the option from the "https" protocol. The "https" protocol already defines the "http_proxy" command line option, like the "http" protocol does. The "http" protocol properly honors that command line option in addition to the environment variable. The "https" protocol doesn't, because the proxy is evaluated in the underlying "tls" protocol, which doesn't have this option, and thus only handles the environment variable, which it has access to. Fixes #7223. Signed-off-by: Moritz Barsnick <barsnick@gmx.net> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/pp_bnk: treat music files as stereoZane van Iperen2021-03-191-7/+45
| | | | | | | | | | These files are technically a series of planar mono tracks. If the "music" flag is set, merge the packets from the two mono tracks, essentially replicating: [0:a:0][0:a:1]join=inputs=2:channel_layout=stereo[a] Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/packet: Also change av_packet_pack/unpack_dictionary to size_tAndreas Rheinhardt2021-03-193-3/+4
| | | | | | | | | These are auxiliary side-data functions, so they should have been switched to size_t in d79e0fe65c51491f9bf8a470bbe36fb09f3e1280, but this has been forgotten. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat: Make AVChapter.id an int64_t on next major bumpAndreas Rheinhardt2021-03-197-4/+23
| | | | | | | | | 64 bits are needed in order to retain the uid values of Matroska chapters; the type is kept signed because the semantics of NUT chapters depend upon whether the id is > 0 or < 0. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskaenc: Check chapter ids for duplicatesAndreas Rheinhardt2021-03-191-13/+19
| | | | | | | | | | | | | | | Up until now, there has been no check that each chapter has a unique id; there was only a check for whether a chapter id is zero (this happens often when the chapters originated from a format that lacks the concept of chapter id and simply counts from zero) which is invalid in Matroska. In this case the chapter ids are offset by 1 to make them nonnegative. Yet offsetting won't fix duplicate ids, therefore this is changed to simply create new chapter uids when the input chapter uids don't conform to the requirements of Matroska (in which case it can be presumed that they did not originate from Matroska, so that we don't need to bother to preserve them). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/tests/fifo_muxer: Fix memleak on error, fix API violationAndreas Rheinhardt2021-03-191-8/+5
| | | | | | | | | | The test program for the FIFO muxer allocates a buffer without padding and wraps it into a packet via av_packet_from_data(). This is an API violation. Furthermore, said buffer leaks in case av_packet_from_data() fails. Fix both of these issues by using av_new_packet() instead. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/tests/fifo_muxer: Fix leak of AVPacket on errorAndreas Rheinhardt2021-03-191-22/+15
| | | | | | | | | Also factor allocating and freeing the packet out. Fixes Coverity issues #1473722 and #1473723; it is a regression since 4b386b2059806ca7ee7f991d2c8b735410693e8c. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mxfdec: Fix leak on errorAndreas Rheinhardt2021-03-191-1/+5
| | | | | | | | It was introduced in d3d9b1fc8e2dfc8b4d66c9916ab7221062ff4660; Fixes Coverity issue #733800. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mxfdec: Don't use wrong type of pointerAndreas Rheinhardt2021-03-191-12/+20
| | | | | | | | | | | If one of the two results of a ternary conditional is a pointer to void, the type of the whole conditional operator is a pointer to void, even when the other possible result is not a pointer to void. This loophole in the type system has allowed mxf_read_local_tags to have a pointer of type pointer to MXFMetadataSet that actually points to an MXFContext. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/tests/movenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-39/+42
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/tests/fifo_muxer: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-10/+18
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/wc3movie: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-11/+10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/subtitles: use av_packet_alloc() to allocate packetsJames Almer2021-03-176-40/+45
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rtpenc_mpegts: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-8/+15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rtpdec: use av_packet_alloc() to allocate packetsJames Almer2021-03-172-27/+39
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mpegtsenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-6/+13
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mpegts: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-16/+20
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-173-47/+77
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-10/+11
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-5/+12
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/hls: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-34/+39
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/flacdec: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-8/+7
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/id3v2: replace call to av_init_packet()James Almer2021-03-171-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/flac_picture: replace call to av_init_packet()James Almer2021-03-171-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avienc: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-6/+12
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avidec: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-10/+14
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/asfdec_o: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-27/+36
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/amvenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-16/+25
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/utils: use av_packet_alloc() to allocate packetsJames Almer2021-03-173-44/+62
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mux: use av_packet_alloc() to allocate packetsJames Almer2021-03-174-20/+32
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/packet_internal: make avpriv_packet_list_* functions use an internal ↵James Almer2021-03-179-29/+31
| | | | | | | | | struct The next pointer is kept at the end for backwards compatability until the major bump, when it should ideally be moved at the front. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/packet: deprecate av_init_packet()James Almer2021-03-171-0/+4
| | | | | | Once removed, sizeof(AVPacket) will stop being a part of the public ABI. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: Handle when we have an mfra box but have not read the full ↵Derek Buitenhuis2021-03-171-0/+4
| | | | | | | | | | | | | sidx for a fragment Use the tfra timestamp if it is available and sidx timestamp is not. Fixes reading the entire file after seeking in a live-style DASH FMP4 with an MFRA. This specifically fixes when use_mfra_for is set. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avformat/aviobuf: don't reduce short seek thresholdAndriy Gelman2021-03-161-7/+3
| | | | | | | | | | | | | | | | | | | | Commit 8c8e5d5286bf598a89ef9993a2cf6ea409d03a32 added a way to reduce seek time by waiting for the windowed tcp packets instead of creating a new socket connection. It implemented this by overwriting s->short_seek_threshold in avio_seek(). However, s->short_seek_threshold could already be set and be higher than the threshold set by the protocol (i.e. s->short_seek_threshold is set in ff_configure_buffers_for_index()). This new feature was only enabled for tls connections in 70d8077b795766e2486e6ec8110f22a97362d6d6. As in Ticket #9148 it reduced performance because instead of waiting to refill the AVIOContext buffers with an existing connections, a new HTTP request was often made instead. Fixes Ticket #9148. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avformat/matroskadec: Check for EOF in resync loopMichael Niedermayer2021-03-151-0/+2
| | | | | | | | | Fixes: Timeout (too long -> instantly) Fixes: 29136/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-4586141227548672 Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ipmovie: Free packets allocated in header readingMichael Niedermayer2021-03-151-2/+6
| | | | | | | | Fixes: memleaks Fixes: 29905/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5679700745781248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavformat/hls: Reset options after open_url_keepalive() failsEd Martin2021-03-151-0/+2
| | | | | | | | | | | | | | open_url_keepalive() unsets the options when it uses them, this includes the offsets for the Range: header. When using the HLS tag #EXT-X-BYTERANGE along with multiple files, the range options must be preserved after open_url_keepalive() returns EOF so that the new file can be opened. Failure to do this results in ignoring the #EXT-X-BYTERANGE tag and reading the wrong bytes of the file. To fix it, reset the options before calling io_open() following open_url_keepalive() reaching EOF Reviewed-by: Steven Liu <liuqi05@kuaishou.com>
* avformat/voc_packet: prevent remaining size from becoming negative in ↵Michael Niedermayer2021-03-141-1/+13
| | | | | | | | | | ff_voc_get_packet() Fixes: memleak Fixes: 30909/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS_fuzzer-4886284057313280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mvi: Check audio size for more overflowsMichael Niedermayer2021-03-141-0/+4
| | | | | | | | Fixes: left shift of negative value -352256000 Fixes: 30837/clusterfuzz-testcase-minimized-ffmpeg_dem_MVI_fuzzer-5755626262888448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/samidec: Deallocate hdr_bufMichael Niedermayer2021-03-141-0/+2
| | | | | | | | Fixes: memleak Fixes: 30841/clusterfuzz-testcase-minimized-ffmpeg_dem_SAMI_fuzzer-4521799196999680 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/cinedec: Fix index_entries size checkMichael Niedermayer2021-03-131-1/+1
| | | | | | | | Fixes: out of array access Fixes: 29868/clusterfuzz-testcase-minimized-ffmpeg_dem_CINE_fuzzer-5692001957445632 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/aaxdec: Check that segments table has been initializedMichael Niedermayer2021-03-131-0/+5
| | | | | | | | Fixes: Timeout Fixes: 29766/clusterfuzz-testcase-minimized-ffmpeg_dem_AAX_fuzzer-5635887566290944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: add Changelog entry for librist and bump minorMarton Balint2021-03-131-1/+1
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/librist: clarify and limit buffer_sizeMarton Balint2021-03-131-1/+1
| | | | | | As suggested by librist developers. Signed-off-by: Marton Balint <cus@passwd.hu>