summaryrefslogtreecommitdiffstats
path: root/libavformat
Commit message (Collapse)AuthorAgeFilesLines
...
* avformat/wtvdec: Check size in SBE2_STREAM_DESC_EVENT / stream2_guidMichael Niedermayer2021-04-011-0/+4
| | | | | | | | | | Fixes: signed integer overflow: 539033600 - -1910497124 cannot be represented in type 'int' Fixes: 30928/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-5922630966312960 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 1f74661543c0c336e88846f90608fda7bd12deac) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/utils: Fix integer overflow with duration_gcd in ff_rfps_calculate()Michael Niedermayer2021-04-011-1/+2
| | | | | | | | | | Fixes: signed integer overflow: 136323327 * 281474976710656 cannot be represented in type 'long' Fixes: 30913/clusterfuzz-testcase-minimized-ffmpeg_dem_IVF_fuzzer-5753392189931520 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 6dc6e1cce0ec0aadab27e8b3fd3fc87c93c3acd6) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/cafdec: Do not build an index if all packets are the sameMichael Niedermayer2021-04-011-9/+14
| | | | | | | | | | Fixes: Timeout Fixes: 28214/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6495999421579264 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit ea12590c8ecc1e3c4c7732e5adced21fb5feffa6) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/vividas: Use equals check with n in read_sb_block()Michael Niedermayer2021-04-011-1/+1
| | | | | | | | | | Fixes: OOM Fixes: 27780/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5097985075314688 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit e44214a8242bc12fa2c86fcc8b0abd2053f1c8f9) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/jacosubdec: Use 64bit intermediate for start/end timestamp shiftMichael Niedermayer2021-04-011-2/+2
| | | | | | | | | | Fixes: signed integer overflow: -1957694447 + -1620425806 cannot be represented in type 'int' Fixes: 30207/clusterfuzz-testcase-minimized-ffmpeg_dem_JACOSUB_fuzzer-5050791771635712 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 2c477be08a64a78ab0a358ae00e2f2dc746f2b47) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/flvdec: Check array entry numberMichael Niedermayer2021-04-011-0/+2
| | | | | | | | | | Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int' Fixes: 30209/clusterfuzz-testcase-minimized-ffmpeg_dem_FLV_fuzzer-5724831658147840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit b5d8fe1c874947ca67ee8117b18f8052f0e590fc) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/movenc: Avoid loosing cluster array on failureMichael Niedermayer2021-04-011-2/+3
| | | | | | | | | | Fixes: crash Fixes: check_pkt.mp4 Found-by: Rafael Dutra <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 5c2ff44f915d6ceeea36a2f99e534562764218dd) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/avidec: Check for dv streams before using priv_data in parse ##dc/##wbMichael Niedermayer2021-04-011-1/+1
| | | | | | | | | | | Fixes: null pointer dereference Fixes: 31588/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-6165716135968768 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Andreas Rheinhardt <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit f733688d30021587c3f3a1b280d6ece8b04f26ff) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/mov: Check sample size for overflow in mov_parse_stsd_audio()Michael Niedermayer2021-04-011-1/+1
| | | | | | | | | | Fixes: signed integer overflow: 2 * 1914708000 cannot be represented in type 'int' Fixes: 31639/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6303428239294464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit d35677736a59ec6579b4da63d9b1444986ba339e) Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/sbgdec: Check for overflow in last loop in expand_timestamps()Michael Niedermayer2021-04-011-2/+7
| | | | | | | | | | | Fixes: signed integer overflow: 9223372036854775807 + 86400000000 cannot be represented in type 'long' Fixes: 31003/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-6256298771480576 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Nicolas George <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit f44068db1e12f14e567e46844447aaa78c694b0b) Signed-off-by: Michael Niedermayer <[email protected]>
* rtpenc_mpegts: add AVClass to the muxer contextGyan Doshi2021-04-011-0/+1
|
* avformat/rtpenc_mpegts: stop leaksGyan Doshi2021-03-281-4/+8
| | | | Fixes CID 1474460 & 1474461
* avformat/rtpenc_mpegts: convey options for rtp muxerGyan Doshi2021-03-261-1/+6
| | | | Cherry-picked 2c806aa2b4
* avformat/rtpenc_mpegts: relay streamid to mpegts muxer streams.Gyan Doshi2021-03-261-0/+1
| | | | Cherry-picked 325bb04188
* avformat/rtpenc_mpegts: convey options for mpeg-ts muxerGyan Doshi2021-03-261-1/+23
| | | | | | Fixes #5239 Cherry-picked affe911c65
* avformat/rtp_mpegts: typedef MuxChain structGyan Doshi2021-03-261-6/+6
| | | | Cherry-picked 75fd3e1519
* avformat/pp_bnk: allow seeking to startZane van Iperen2021-03-251-1/+21
| | | | | | | Allows "ffplay -loop" to work. Signed-off-by: Zane van Iperen <[email protected]> (cherry picked from commit 64fb63411de8b6970dda385bf87d4a70ce357602)
* avformat/alp: allow seeking to startZane van Iperen2021-03-251-18/+32
| | | | | | | Allows "ffplay -loop" to work. Signed-off-by: Zane van Iperen <[email protected]> (cherry picked from commit ea9732c5d618c92e9fef3c4ffcb803b969524539)
* avformat/kvag: allow seeking to startZane van Iperen2021-03-251-1/+11
| | | | | | | Allows "ffplay -loop" to work. Signed-off-by: Zane van Iperen <[email protected]> (cherry picked from commit 3cc4a140ef18e340fa3f003daf66ded8c275de38)
* Revert "lavf: move AVStream.*index_entries* to AVStreamInternal"James Almer2021-03-2334-304/+300
| | | | | | | This reverts commit cea7c19cda0ea1630ae1de8c102ab14231b9db10. Until an API is added to make index_entries public in a proper way, keeping this here is harmless.
* avformat/pp_bnk: Fix memleaks when reading non-stereo tracksAndreas Rheinhardt2021-03-221-22/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 6973df112275c8ea4af0bf3cb1338baecc1d06b3 added support for music tracks by outputting its two containing tracks together in one packet. But the actual data is not contiguous in the file and therefore one can't simply use av_get_packet() (which has been used before) for it. Therefore the packet was now allocated via av_new_packet() and read via avio_read(); and this is also for non-music files. This causes problems because one can now longer rely on things done automatically by av_get_packet(): It automatically freed the packet in case of errors; this lead to memleaks in several FATE-tests covering this demuxer. Furthermore, in case the data read is less than the data desired, the returned packet was not zero-allocated (the packet's padding was uninitialized); for music files the actual data could even be uninitialized. The former problems are fixed by using av_get_packet() for non-music files; the latter problem is handled by erroring out unless both tracks could be fully read. Reviewed-by: Zane van Iperen <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]> (cherry picked from commit 8a73313412eeafcfa5afa45f39f65f2581ba3bbc)
* avformat/mov: Fix extended atom size buffer length checkDerek Buitenhuis2021-03-211-1/+1
| | | | | | | | | | | | | | | | | When extended atom size support was added to probing in fec4a2d232d7ebf6d1084fb568d4d84844f25abc, the buffer size check was backwards, but probing continued to work because there was no minimum size check yet, so despite size being 1 on these atoms, and failing to read the 64-bit size, the tag was still correctly read. When 0b78016b2d7c36b32d07669c0c86bc4b4225ec98 introduced a minimum size check, this exposed the bug, and broke probing any files with extended atom sizes, such as entirely valid large files that start whith mdat atoms. Signed-off-by: Derek Buitenhuis <[email protected]> (cherry picked from commit 85f397c828c8766d411d7bfc773c1241057e9d30)
* avformat: remove FF_API_INIT_PACKET from AVStream.attached_picJames Almer2021-03-211-4/+0
| | | | | | | | This field needs to be replaced altogether, not just its type changed. This will be done in a separate change. Signed-off-by: James Almer <[email protected]> (cherry picked from commit 34f4f5780037b2e26a42fa83cd25d79b1d6c138a)
* Bump Versions before release/4.4 branchMichael Niedermayer2021-03-201-1/+1
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Signed-off-by: Marton Balint <[email protected]>
* avformat/libsrt: fix help messageZhao Zhili2021-03-191-1/+1
| | | | | | SRTO_TLPKTDROP works for receiver and sender both. Signed-off-by: Marton Balint <[email protected]>
* avformat/libsrt: fix setsockopt() typoZhao Zhili2021-03-191-1/+1
| | | | Signed-off-by: Marton Balint <[email protected]>
* 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 <[email protected]> Signed-off-by: Marton Balint <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* 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 <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* 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 <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* 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 <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* 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 <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/tests/movenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-39/+42
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/tests/fifo_muxer: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-10/+18
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/wc3movie: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-11/+10
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/subtitles: use av_packet_alloc() to allocate packetsJames Almer2021-03-176-40/+45
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/rtpenc_mpegts: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-8/+15
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/rtpdec: use av_packet_alloc() to allocate packetsJames Almer2021-03-172-27/+39
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/mpegtsenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-6/+13
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/mpegts: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-16/+20
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/movenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-173-47/+77
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/matroskaenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-10/+11
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/matroskadec: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-5/+12
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/hls: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-34/+39
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/flacdec: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-8/+7
| | | | Signed-off-by: James Almer <[email protected]>