summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* avformat/rtpenc_mpegts: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rtpdec: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mpegtsenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mpegts: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/hls: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/flacdec: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/id3v2: replace call to av_init_packet()James Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/flac_picture: replace call to av_init_packet()James Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avienc: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avidec: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/asfdec_o: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/amvenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/utils: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mux: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/packet_internal: make avpriv_packet_list_* functions use an internal ↵James Almer2021-03-17
| | | | | | | | | 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-17
| | | | | | 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-17
| | | | | | | | | | | | | 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-16
| | | | | | | | | | | | | | | | | | | | 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-15
| | | | | | | | | 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-15
| | | | | | | | 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-15
| | | | | | | | | | | | | | 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-14
| | | | | | | | | | 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-14
| | | | | | | | 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-14
| | | | | | | | 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-13
| | | | | | | | 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-13
| | | | | | | | 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-13
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/librist: clarify and limit buffer_sizeMarton Balint2021-03-13
| | | | | | As suggested by librist developers. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/librist: increase default loglevelMarton Balint2021-03-13
| | | | | | | | | Also remove AV_LOG_SIMULATE from the list as it is not used directly, and do not use panic level on unknown loglevel, but make them warn. Also fix mapping of NOTICE/INFO/VERBOSE and add documentation about when the option should actually be used. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/librist: simplify secret strlcpyMarton Balint2021-03-13
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/librist: make packet size adjustable for writing, fix it for readingMarton Balint2021-03-13
| | | | | | | | Maximum packet size is 10000 (RIST_MAX_PACKET_SIZE, which is unfortunately private) minus the RIST protocol overhead which is 28 bytes for the unencrypted case, 36 for the encrypted case. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/librist: rework librist_readMarton Balint2021-03-13
| | | | | | | Queue tracking makes no difference so remove it, return EAGAIN of no data is available and rist data block needs to be freed even for zero sized packets. Signed-off-by: Marton Balint <cus@passwd.hu>
* libavformat: add librist protocolPaul B Mahol2021-03-13
| | | | | | This work is sponsored by Open Broadcast Systems. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/adp, svs: Remove redundant av_shrink_packet()Andreas Rheinhardt2021-03-12
| | | | | | | | | av_get_packet() already makes sure that the packet size is accurate and that the packet data is zero-padded even when one could not read as much as desired. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/gopher: Add support for Gopher over TLSparazyd2021-03-11
| | | | | | | | | | | | | | | | This commit adds a "gophers" handler to the gopher protocol. gophers is a community-adopted protocol that acts the same way like normal gopher with the added TLS encapsulation. The gophers protocol is supported by gopher servers like geomydae(8), and clients like curl(1), clic(1), and hurl(1). This commit also adds compilation guards to both gopher and gophers, since now there are two protocols in the file it makes sense to have this addition. Signed-off-by: parazyd <parazyd@dyne.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/gopher: Add default_whitelist to ff_gopher_protocolparazyd2021-03-11
| | | | | Signed-off-by: parazyd <parazyd@dyne.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* avisynth: fix audio on big endianStephen Hutchinson2021-03-11
| | | | | | | | AviSynth+ outputs audio in the same format as the OS, so assuming little endian formats as input on big endian OSes results in nothing but static. Signed-off-by: Stephen Hutchinson <qyot27@gmail.com>
* avisynth: populate field orderemcodem2021-03-11
| | | | | | Fixes Trac ticket #8757 Signed-off-by: Stephen Hutchinson <qyot27@gmail.com>
* avisynth: more intelligent RGB flippingStephen Hutchinson2021-03-11
| | | | | | | | avs_is_color_space provides a generic way of checking whether the video is RGB, and has been available through AVSC_API since 2.6. This means that GetProcAddress doesn't have to run on every frame. Signed-off-by: Stephen Hutchinson <qyot27@gmail.com>
* avformat/rawenc: Use init instead of write_header functionAndreas Rheinhardt2021-03-11
| | | | | | force_one_stream() does not write anything. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat: use the buffer_size_t typedef where requiredJames Almer2021-03-10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/utils: change AVStream side data related public function and struct ↵James Almer2021-03-10
| | | | | | | | | size types to size_t av_stream_add_side_data() already defines size as a size_t, so this makes it consistent across all side data functions. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mvdec: Allocate extradata only onceMichael Niedermayer2021-03-09
| | | | | | | | Fixes: memleak Fixes: 28686/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5822961932173312 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/flvdec: Check double before cast in parse_keyframes_index()Michael Niedermayer2021-03-08
| | | | | | | | Fixes: -2.21166e+304 is outside the range of representable values of type 'long' Fixes: 29169/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5725452796821504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/paf: Check for EOF before allocation in read_header()Michael Niedermayer2021-03-08
| | | | | | | | Fixes: OOM Fixes: 26584/clusterfuzz-testcase-minimized-ffmpeg_dem_PAF_fuzzer-5172661183053824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/swfdec: Check outlen before allocationMichael Niedermayer2021-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: Timeout (too long -> 241ms) Fixes: 29083/clusterfuzz-testcase-minimized-ffmpeg_dem_SWF_fuzzer-6273684478230528 The source of the magic number is A very quick simulation of the best case compression for "compress" below is not nice written code as i did not expect I or anyone else would ever see it again I would have preferred some nicer expression or course, but thats what it seems to be asymptotically. For smaller amounts of data a tighter bound is possible but i saw no nice way to consider that and it seems also overkill to try to do it more fine grained for just this main(){ int64_t bits = 0; int bank = 256; int bitbank = 8; for(unsigned i = 0; i<1024*1024*1024*4U-100000;) { int word_size = bank-255; i += word_size; bits += bitbank; if (!(bank & (bank-1))) bitbank ++; bank++; if (bitbank > 16) { printf("BEST %f \n", 8.0 * i / bits ); bank = 256; bitbank = 8; } } } above assumes i remembered correctly how the algorithm works but the value was close to what actual compession of zeros gave Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mobiclip: fix copyright headersFlorian Nouwt2021-03-08
| | | | | | | | The Mobiclip related code was based on Mobius (https://github.com/adibsurani/Mobius), which was based on my original reverse engineering efforts (https://github.com/Gericom/MobiclipDecoder). This commit adds the appropriate copyright headers on the related files. Signed-off-by: Florian Nouwt <fnouwt2@gmail.com>