summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* hwcontext_vulkan: update debugging layer nameLynne2020-05-101-1/+1
|
* hwcontext_vulkan: remove unused internal REQUIRED extension flagLynne2020-05-101-16/+4
| | | | | This is a leftover from an old version which used the 1.0 Vulkan API with the maintenance extensions being required.
* hwcontext_vulkan: expose enabled device and instance extensionsLynne2020-05-104-11/+56
| | | | | | | This solves a huge oversight - it lets users reliably use their own AVVulkanDeviceContext. Otherwise, the extensions supplied and enabled are not discoverable by anything outside of hwcontext_vulkan. Also clarifies that any user-supplied VkInstance must be at least 1.1.
* hwcontext_vulkan: let users enable device and instance extensions using optionsLynne2020-05-102-7/+81
| | | | | | Also documents all options supported by the hwdevice. This lets users enable all extensions they need without writing their own instance initialization code.
* avformat/hlsenc: Simplify setting base_output_dirnameAndreas Rheinhardt2020-05-101-15/+9
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/hlsenc: Simplify setting basename with av_asprintf()Andreas Rheinhardt2020-05-101-29/+14
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/hlsenc: Simplify setting subtitle basename with av_asprintfAndreas Rheinhardt2020-05-101-12/+8
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/hlsenc: Don't cast const awayAndreas Rheinhardt2020-05-101-4/+4
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/hlsenc: Remove redundant initializationsAndreas Rheinhardt2020-05-101-4/+0
| | | | | | | | | | | | | For every variantstream vs, vs->packets_written is set to one, only to be set to zero a few lines below. Given that the relevant structure has been zeroed during the allocation, this commit removes both assignments. A redundant initialization for vs->init_range_length has been removed as well a few lines below. Given that the relevant structure has been zeroed during the allocation, this commit removes both assignments. A redundant initialization for vs->init_range_length has been removed as well. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/hlsenc: Don't reset AVIOContext pointer manually a second timeAndreas Rheinhardt2020-05-101-1/+0
| | | | | | ff_format_io_close() already does it for us. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avfilter/vf_signalstats: reindent after last commitLimin Wang2020-05-101-6/+6
| | | | Signed-off-by: Limin Wang <[email protected]>
* avfilter/vf_signalstats: make the alloc array used for any bit depthLimin Wang2020-05-101-9/+9
| | | | Signed-off-by: Limin Wang <[email protected]>
* avfilter/vf_signalstats: add SignalstatsContext.maxsize variableLimin Wang2020-05-101-9/+11
| | | | Signed-off-by: Limin Wang <[email protected]>
* avfilter/vf_signalstats: rename config_props -> config_outputLimin Wang2020-05-101-2/+2
| | | | Signed-off-by: Limin Wang <[email protected]>
* fate: add signalstats 8bit and 10bit testLimin Wang2020-05-103-0/+7
| | | | Signed-off-by: Limin Wang <[email protected]>
* avformat/http: Fix for invalid use of av_strtokLimin Wang2020-05-101-2/+6
| | | | Signed-off-by: Limin Wang <[email protected]>
* avformat/ftp: Fix for invalid use of av_strtokLimin Wang2020-05-101-6/+8
| | | | | | | | | | By the av_strtok() description: * On the first call to av_strtok(), s should point to the string to * parse, and the value of saveptr is ignored. In subsequent calls, s * should be NULL, and saveptr should be unchanged since the previous * call. Signed-off-by: Limin Wang <[email protected]>
* avformat/wavenc: simplify, use av_rescale_q() insteadLimin Wang2020-05-101-4/+3
| | | | Signed-off-by: Limin Wang <[email protected]>
* avformat/vividas: simplify, use av_rescale_q() insteadLimin Wang2020-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | note it'll cause a small difference in accuracy for the pts, please see the testing result below: $ wget http://samples.ffmpeg.org/archive/all/unknown+unknown+unknown+unknown+5029_paramount_en_1250.viv $ ./ffmpeg -t 0.04 -i ./unknown+unknown+unknown+unknown+5029_paramount_en_1250.viv -f null - old: pts: 522 pts: 1044 pts: 1567 pts: 3918 pts: 8097 pts: 12277 pts: 16457 ... new: pts: 522 pts: 1045 pts: 1567 pts: 3918 pts: 8098 pts: 12278 pts: 16457 ... Signed-off-by: Limin Wang <[email protected]>
* hwcontext_vulkan: optionally enable the VK_KHR_surface extension if availableLynne2020-05-101-1/+1
| | | | This allows any phys_device derived to be used as a display rendering device.
* avcodec/dstdec: Check sample rateMichael Niedermayer2020-05-101-0/+4
| | | | | | | | | Fixes: out of array access Fixes: 20659/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5735812071424000 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/decode: remove unused AVCodecInternal compat_decode fieldJames Almer2020-05-092-3/+0
| | | | Signed-off-by: James Almer <[email protected]>
* avcodec/v4l2_context: Finish draining if V4L2_BUF_FLAG_LAST is setAndriy Gelman2020-05-091-0/+4
| | | | | | | | | | | | | | | | | | V4L2 api can indicate that flushing of the capture buffers is completed by setting the V4L2_BUF_FLAG_LAST flag. Use guards because the flag was only defined in Linux v4.2. Reference: linux/Documentation/media/uapi/v4l/dev-decoder.rst "The client must continue to handle both queues independently, similarly to normal decode operation. This includes: ... - queuing and dequeuing CAPTURE buffers, until a buffer marked with the V4L2_BUF_FLAG_LAST flag is dequeued" Reviewed-by: Ming Qian <[email protected]> Signed-off-by: Andriy Gelman <[email protected]>
* avcodec/v4l2_context: Drop empty packet while drainingAndriy Gelman2020-05-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | v4l2_m2m devices may send an empty packet/frame while draining to indicate that all capture buffers have been flushed. Currently, the empty packet/frame is not handled correctly: When encoding, the empty packet is forwarded to the muxer, usually creating warnings. When decoding, a reference to the memory is created anyway. Since in the past this memory contained a decoded frame, it results in an extra frame being decoded. This commit discards the empty packet/frame. References: linux/Documentation/media/uapi/v4l/dev-decoder.rst: "The last buffer may be empty (with :c:type:`v4l2_buffer` bytesused = 0) and in that case it must be ignored by the client, as it does not contain a decoded frame." linux/Documentation/media/uapi/media/v4l/vidioc-encoder-cmd.rst: "...This buffer may be empty, indicated by the driver setting the ``bytesused`` field to 0." Reviewed-by: Ming Qian <[email protected]> Signed-off-by: Andriy Gelman <[email protected]>
* avcodec/aacdec_template: Pass AVCodecContext seperatly to ↵Michael Niedermayer2020-05-101-10/+10
| | | | | | | | | | | set_default_channel_config() Regression since 4d9b9c5e4637ac15205467f16fcac92a28e18f18 Fixes: Null pointer dereference Fixes: 21642/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5670101358739456 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/thp: Require a video streamMichael Niedermayer2020-05-101-0/+3
| | | | | | | | | | The demuxer code assumes the existence of a video stream Fixes: assertion failure Fixes: 21512/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5699660783288320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/mpeg: Decrease score by 1 for files with very little valid dataMichael Niedermayer2020-05-101-1/+1
| | | | | | Fixes: 8233/PPY6574574605_cut.mp3 Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/pngdec: Check length in fdATMichael Niedermayer2020-05-101-1/+1
| | | | | | | | Fixes: 21089/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5135981419429888 Fixes: out of array read Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* tools/target_dec_fuzzer: Adjust threshold for PNG and APNGMichael Niedermayer2020-05-101-0/+2
| | | | | | | | Fixes: Timeout (84sec -> 2sec) Fixes: 21127/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5098412367413248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/g2meet: Check tile_width in epic_jb_decode_tile()Michael Niedermayer2020-05-101-0/+5
| | | | | | | | | | Fixes: out of array access Fixes: 21469/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5199357982015488 Alternatively the arrays can be made bigger or the index can be clipped. In case a real file with such huge tiles exist we ask the user to upload it. Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/hapdec: Check tex_size more strictly and before using itMichael Niedermayer2020-05-101-9/+14
| | | | | | | | | Fixes: OOM Fixes: 20774/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5678608951803904 Fixes: 20956/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5713643025203200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* configure: add missing bsf dependencies to muxersJames Almer2020-05-091-3/+5
| | | | Signed-off-by: James Almer <[email protected]>
* configure: fix pcm_rechunk_bsf dependency for MXF and GXF muxersJames Almer2020-05-091-3/+2
| | | | Signed-off-by: James Almer <[email protected]>
* avdevice/v4l2enc: Allow writing non-rawvideos to v4l2.David Manouchehri2020-05-091-3/+7
| | | | Signed-off-by: David Manouchehri <[email protected]>
* avformat/oggenc: Avoid allocating and copying when writing page dataAndreas Rheinhardt2020-05-091-40/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | When the Ogg muxer writes a page, it has to do three things: It needs to write a page header, then it has to actually copy the page data and then it has to calculate and write a CRC checksum of both header as well as data at a certain position in the page header. To do this, the muxer used a dynamic buffer for both writing as well as calculating the checksum via an AVIOContext's feature to automatically calculate checksums on the data it writes. This entails an allocation of an AVIOContext, of the opaque specific to dynamic buffers and of the buffer itself (which may be reallocated multiple times) as well as memcopying the data (first into the AVIOContext's small write buffer, then into the dynamic buffer's big buffer). This commit changes this: The page header is no longer written into a dynamic buffer any more; instead the (small) page header is written into a small buffer on the stack. The CRC is then calculated directly via av_crc() on both the page header as well as the page data. Then both the page header and the page data are written. Finally, ogg_write_page() can now no longer fail, so it has been modified to return nothing; this also fixed a bug in the only caller of this function: It didn't check the return value. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/mpegvideo: return more specific error codes for init_duplicate_context()Limin Wang2020-05-091-1/+1
| | | | Signed-off-by: Limin Wang <[email protected]>
* avcodec/mpegvideo: return more specific error codes for ff_mpv_common_init()Limin Wang2020-05-091-14/+16
| | | | Signed-off-by: Limin Wang <[email protected]>
* avcodec/mpeg12enc: return more specific error codes for encode_init()Limin Wang2020-05-091-6/+7
| | | | Signed-off-by: Limin Wang <[email protected]>
* avcodec/mpegvideo_enc: return more specific error codes for ff_mpv_encode_init()Limin Wang2020-05-091-42/+43
| | | | Signed-off-by: Limin Wang <[email protected]>
* doc/encoders: remove unsubstantiated ffaacenc > fdk-aac claimLou Logan2020-05-081-9/+2
| | | | | | | | | | | | | | | | | | | After this claim was made in e34e361 kamedo2 did an in-depth ABX test comparing these encoders: https://hydrogenaud.io/index.php?topic=111085.0 Result: FFmpeg AAC wasn't as good as libfdk_aac on average. I know some things have changed since then such as, "use the fast coder as the default" (fcb681ac) for example, so maybe the situation is different now. However, I am unaware of any recent comparison. So without any substantiation we shouldn't make such a blantant claim. Signed-off-by: Lou Logan <[email protected]> Signed-off-by: Gyan Doshi <[email protected]>
* avcodec/(null|opus_metadata)_bsf: Use ff_bsf_get_packet_ref() directlyAndreas Rheinhardt2020-05-082-12/+2
| | | | | Reviewed-by: James Almer <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/bsf: Restrict ff_bsf_get_packet_ref() return values to <= 0Andreas Rheinhardt2020-05-081-1/+1
| | | | | | | | | | | | | | | Up until now the documentation of ff_bsf_get_packet_ref() allowed return values >= 0 in case of success, whereas av_bsf_receive_packet() only allows 0 on success. Given that for some bitstream filters the return value of ff_bsf_get_packet_ref() is forwarded to the caller of av_bsf_receive_packet() without any filtering, there would be a problem if ff_bsf_get_packet_ref() actually returned values > 0. But it currently doesn't and there is no reason why it should ever do so. Therefore this commit aligns the return values of these functions by restricting ff_bsf_get_packet_ref() to always returns 0 on success. Reviewed-by: James Almer <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/hlsenc: CosmeticsAndreas Rheinhardt2020-05-081-80/+55
| | | | | | | Mainly includes reindentation and returning directly (i.e. without a goto fail when possible). Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/hlsenc: Factor check out of loopAndreas Rheinhardt2020-05-081-8/+9
| | | | | | The check will be true at most once anyway. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/hlsenc: Localize initialization of subtitle streamsAndreas Rheinhardt2020-05-081-7/+3
| | | | | | Before this commit, the checks were unnecessarily scattered. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/hlsenc: Unconditionally free some stringsAndreas Rheinhardt2020-05-081-5/+3
| | | | | | | | | | | | hls_init() would at first allocate the vtt_basename string, then allocate the vtt_m3u8_name string followed by several operations that may fail and then open the subtitles' output context. Yet upon freeing, these strings were only freed when the subtitles' output context existed, ensuring that they leak if something goes wrong between their allocation and the opening of the subtitles' output context. So drop the check for whether this output context exists. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/hlsenc: Check some unchecked allocationsAndreas Rheinhardt2020-05-081-1/+12
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/hlsenc: Add deinit functionAndreas Rheinhardt2020-05-081-30/+17
| | | | | | | | | | | | | | | | This fixes memleaks in instances such as: a) When an allocation fails at one of the two places in hls_init() where the error is returned immediately without goto fail first. b) When an error happens when writing the header. c) When an allocation fails at one of the three places in hls_write_trailer() where the error is returned immediately without goto fail first. d) When one decides not to write the trailer at all (e.g. because of errors when writing packets). Furthermore, it removes code duplication and allows to return immediately, without goto fail first. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/mpegvideo_enc: reindent codeLimin Wang2020-05-081-2/+2
| | | | | Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Limin Wang <[email protected]>
* avformat/hlsenc: Avoid setting unused variablesAndreas Rheinhardt2020-05-081-8/+8
| | | | | | | Several variables which are only used when the HLS_SINGLE_FILE flag is unset have been set even when this flag is set. This has been changed. Signed-off-by: Andreas Rheinhardt <[email protected]>