aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* avformat/librist: increase default loglevelMarton Balint2021-03-132-6/+7
| | | | | | | | | 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-131-1/+1
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/librist: make packet size adjustable for writing, fix it for readingMarton Balint2021-03-132-5/+15
| | | | | | | | 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-131-6/+8
| | | | | | | 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-135-0/+272
| | | | | | This work is sponsored by Open Broadcast Systems. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* libavutil/timer: Fix clang reserved-user-defined-literalChristopher Degawa2021-03-131-1/+1
| | | | | | | | clang errors when compiling with C++11 about needing spaces between literal and identifier Signed-off-by: Christopher Degawa <ccom@randomderp.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/pulse_audio_dec: do not read undersized framesMarton Balint2021-03-121-30/+41
| | | | | | | | | | | Keep on reading fragments until we got fragment_size amount of data, otherwise we might get frames with 1-2 samples only if pa_stream_peek is called slightly less frequently than sample rate. Note that fragments might contain a lot less data than fragment_size, so reading multiple fragments to get fragment_size amount of data is intentional. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/pulse_audio_dec: only set adjust latency flag if fragment_size is ↵Marton Balint2021-03-121-1/+1
| | | | | | | | not set Otherwise fragment_size is ignored. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/pulse_audio_dec: query actual fragment sizeMarton Balint2021-03-121-0/+9
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/alsa_dec: make sure we have enough data in non-blocking modeMarton Balint2021-03-123-10/+18
| | | | | | | Otherwise we might return 1-2 samples per packet if av_read_frame() call rate is only sligthly less than the stream sample rate. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec: add a get_encode_buffer() callback to AVCodecContextJames Almer2021-03-127-4/+131
| | | | | | | | | | | This callback is functionally the same as get_buffer2() is for decoders, and implements for the new encode API the functionality of the old encode API had where the user could provide their own buffers. Reviewed-by: Lynne <dev@lynne.ee> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
* cbs_sei: Detect payload overflows when reading SEI messagesMark Thompson2021-03-121-1/+16
| | | | | | | | | | The top-level GetBitContext is sized for the whole NAL unit, so it fails to detect overflows where a payload continues into the following message. To fix that, we make a new context on the stack for reading each payload. Fixes: 29892/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_REDUNDANT_PPS_fuzzer-6310830956216320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Tested-by: Michael Niedermayer <michael@niedermayer.cc>
* cbs_h265: Detect more reference combinations which would overflow the DPBMark Thompson2021-03-121-2/+21
| | | | | | | | | | | | | | | | | | | | | In total, the number of short term references (from the selected short term ref pic set), the number of long term references (combining both the used candidates from the SPS and those defined in the slice header) and the number of instances of the current picture (usually one, but can be two if current picture reference is enabled) must never exceed the size of the DPB. This is a generalisation of the condition associated with num_long_term_pics in 7.4.7.1. We use this to apply tighter bounds to the number of long term pictures referred to in the slice header, and also to detect the invalid case where the second reference to the current picture would not fit in the DPB (this case can't be detected earlier because an STRPS with 15 pictures can still be valid in the same stream when used with a different PPS which does not require two DPB slots for the current picture). Fixes: 24913/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_METADATA_fuzzer-6261760693370880 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Tested-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cbs_h26[45]: Remove redundant enum constantsAndreas Rheinhardt2021-03-122-19/+0
| | | | | | | Unused since 8843607f495c95c1e67a3ce3d6f15dca6e252439. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/cbs_sei: Fix leak of AVBufferRef on errorAndreas Rheinhardt2021-03-121-8/+8
| | | | | | | | | | | | | | | An AVBufferRef (and the corresponding AVBuffer and the underlying actual buffer) would leak in ff_cbs_sei_add_message() on error in case an error happened after its creation and before it has been attached to more permanent storage. Fix this by only creating the AVBufferRef immediately before attaching it to its intended target position. (Given that no SEI message currently created is refcounted, the above can't happen at the moment. But Coverity already nevertheless noticed: This commit fixes Coverity issue #1473521.) Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/cbs_sei: Don't use -1th element of arrayAndreas Rheinhardt2021-03-121-1/+1
| | | | | | | | (This affected only suffix SEI messages; yet no such SEI messages are currently inserted.) Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/cbs: Remove redundant checks for CodedBitstreamContext.codecAndreas Rheinhardt2021-03-121-3/+3
| | | | | | | | | | | | | Setting this field happens immediately after the allocation in ff_cbs_init(), so the whole CBS code may presume that any CodedBitstreamContext has this set. Lots of code already presumed this, yet ff_cbs_close() did it inconsistently: It checked before checking whether the CodedBitstreamType has a close function; yet it simply unconditionally read ctx->codec->priv_class. Coverity complained about this in issue #1473564, which this commit fixes. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/nvenc: base timestamps on frameIntervalPMartin Storsjö2021-03-121-1/+1
| | | | | | | | | | | | | If b-frames were enabled implicitly (if max_b_frames wasn't set by the caller at all, since a0949d0bcb0eee2f3fffcf9a4810c0295d14c0dc), we wouldn't offset dts at all, producing invalid pts/dts combinations (causing loud warnings by ffmpeg, or muxer errors if passed without an extra cleanup pass). Instead use frameIntervalP for offsetting, which should always be accurate. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avfilter/vf_uspp: Fix leak of packet side dataAndreas Rheinhardt2021-03-121-0/+1
| | | | | | | | | | | The uspp filter uses a special option ("no_bitstream") of the Snow encoder to suppress it from generating output. The filter therefore did not unref the packet after usage, believing it to be blank. But this is wrong, as the Snow encoder attaches quality stats side data to the packet. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_uspp: Fix leak of qp-table on errorAndreas Rheinhardt2021-03-121-0/+2
| | | | | | | Fixes Coverity issue #1473500. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/decode: ReindentationAndreas Rheinhardt2021-03-121-25/+24
| | | | | Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/decode: Remove always-true checkAndreas Rheinhardt2021-03-121-2/+0
| | | | | | | Forgotten in 1fd76277708cf83572ba243e98f9e848c652f83d. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/adp, svs: Remove redundant av_shrink_packet()Andreas Rheinhardt2021-03-122-7/+2
| | | | | | | | | 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-118-5/+38
| | | | | | | | | | | | | | | | 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-112-9/+9
| | | | | Signed-off-by: parazyd <parazyd@dyne.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/gifenc: Actually use the shrunk paletteDerek Buitenhuis2021-03-111-2/+1
| | | | | | I have no idea how nobody, including myself, noticed this. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/h264_slice: don't copy frame data during error concealmentJames Almer2021-03-111-7/+8
| | | | | | | | | In addition to the fact that av_image_copy() cannot handle hardware pixel formats, h->short_ref[0]->f may not be writable at this point. Based on a patch by Hendrik Leppkes. Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/decklink: add missing include for buffer_size_tJames Almer2021-03-112-0/+2
| | | | | | | Should fix compilation broken in f7abb53cb427515faac582f114ab97cbbd590280. Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: James Almer <jamrial@gmail.com>
* avisynth: fix audio on big endianStephen Hutchinson2021-03-111-4/+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-111-0/+17
| | | | | | Fixes Trac ticket #8757 Signed-off-by: Stephen Hutchinson <qyot27@gmail.com>
* avisynth: more intelligent RGB flippingStephen Hutchinson2021-03-111-22/+5
| | | | | | | | 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-111-30/+30
| | | | | | force_one_stream() does not write anything. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/4xm: Check pre_gb in decode_i_block()Michael Niedermayer2021-03-111-2/+2
| | | | | | | | Fixes: Timeout Fixes: 31257/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-5150866229297152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/buffer_internal: Include internal for buffer_size_tAndreas Rheinhardt2021-03-111-0/+1
| | | | | | | Fixes checkheaders. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* dnn/dnn_backend_native_layer_mathbinary: Fix leak upon errorAndreas Rheinhardt2021-03-111-12/+11
| | | | | | | Fixes Coverity issue #1473568. Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* dnn/dnn_backend_native_layer_conv2d: Don't pretend convolution can failAndreas Rheinhardt2021-03-111-2/+1
| | | | | | | | | It can't; these are just remnants of commit 3c7cad69f233252e5178f7732baa0da950d74bbd which let the worker threads do the reallocation. Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* dnn/dnn_backend_native_layer_conv2d: Check thread creation for errorsAndreas Rheinhardt2021-03-111-3/+10
| | | | | | | Fixes Coverity issue #1473533. Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* dnn/dnn_backend_native_layer_conv2d: Check allocationAndreas Rheinhardt2021-03-111-0/+2
| | | | | Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* dnn/dnn_backend_native_layer_conv2d: Avoid separate, unchecked allocationsAndreas Rheinhardt2021-03-111-10/+6
| | | | | Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* dnn/dnn_backend_native_layer_conv2d: Fix memleak on errorAndreas Rheinhardt2021-03-111-1/+2
| | | | | | | | | | If an error happens when preparing the output data buffer, an already allocated array would leak. Fix this by postponing its allocation. Fixes Coverity issue #1473531. Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* dnn/dnn_backend_native_layer_conv2d: Avoid allocation when single-threadedAndreas Rheinhardt2021-03-111-9/+9
| | | | | | | | | Also fixes a memleak in single-threaded mode when an error happens in preparing the output data buffer; and also removes an unchecked allocation. Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* dnn/dnn_backend_native_layer_conv2d: Join two arrays, avoid allocationAndreas Rheinhardt2021-03-111-5/+5
| | | | | | | Fixes Coverity issue #1473507. Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* dnn/dnn_backend_native_layer_conv2d: Fix memleak on realloc failureAndreas Rheinhardt2021-03-111-2/+4
| | | | | Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* dnn/dnn_backend_native: Fix typo in log messageAndreas Rheinhardt2021-03-111-1/+1
| | | | | Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* dnn/dnn_backend_native: Don't use asserts for checksAndreas Rheinhardt2021-03-111-0/+2
| | | | | | | | | | asserts should not be used instead of ordinary input checks. Yet the native DNN backend did it: get_input_native() asserted that the first dimension was one, despite this value coming directly from the input file without having been sanitized. Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* dnn/dnn_backend_native: Fix leak in case parsing options failsAndreas Rheinhardt2021-03-111-1/+1
| | | | | Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* dnn/dnn_backend_native: Avoid allocation for checking file magicAndreas Rheinhardt2021-03-111-16/+6
| | | | | Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* Doc: Tech Resolution ProcessJean-Baptiste Kempf2021-03-112-1/+92
|
* avcodec/libilbc: Support newer libiLBC versionsAndreas Rheinhardt2021-03-111-0/+17
| | | | | | | | | | | | | Beginning with version 3.0, libiLBC switched the types of some parts of their public API to size_t and renamed some types; the old names continue to work as typedefs, but are deprecated. It furthermore added version macros. This commit uses said version macro to use the new types when using newer libiLBC versions. Reviewed-by: Timothy Gu <timothygu99@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avutil: use the buffer_size_t typedef where requiredJames Almer2021-03-108-8/+8
| | | | Signed-off-by: James Almer <jamrial@gmail.com>