avcodec/flacdsp: Fix integer-overflow in flac_lpc_33_c This fix copies a couple of casts from surrounding functions. See https://crbug.com/432528781 for stack trace details. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
avfilter/avfiltergraph: add logging for filter formats There is no convenient way, from the command line, to figure out which formats a filter actually supports. This commit changes that by adding a log output, at debug level, to simply print the list of formats each filter advertises on its links, before any negotiation. Furthermore, we can use the exact same helper function to also print out the corresponding filter links when there is an error during format negotiation. We need to use AV_BRINT_SIZE_UNLIMITED because the default format list for filters like vf_scale is about 1700 characters long, significantly larger than the the 1 kB default buffer.
avfilter/vf_vibrance: Update default value of rlum/blum Fix #9195 It looks like vf_vibrance.c is similar to https://github.com/zachsaw/RenderScripts/blob/master/RenderScripts/ImageProcessingShaders/SweetFX/Vibrance.hlsl and https://github.com/kevinlekiller/kwin-effect-shaders_shaders/blob/main/Vibrance.frag Originall written by Christian Cann Schuldt Jensen ~ CeeJay.dk. They use same matrix coeff. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
swscale/alphablend: don't overread alpha plane on subsampled odd size This function overreads the input plane for odd dimensions, because the chroma plane is always rounded up, which means (xy << subsample) + 1 exceeds the actual alpha plane size. To verify: valgrind ffmpeg -pix_fmt yuva420p -f lavfi -i color -vf \ "scale=1x1,format=yuva420p,scale=alphablend=uniform_color,format=yuv420p \ -vframes 1 -f null - Fixes: https://trac.ffmpeg.org/ticket/11692
avformat/movenc: support writing more than one STSD entry per track If a packet contains new extradata within a side data entry, save for specific cases it means the coded stream changed. If ignored, upon demuxing every packet from then onwards may be undecodable. Signed-off-by: James Almer <jamrial@gmail.com>
avformat/mov: export the correct initial extratada from samples with multiple stsd The first sample in the stsc box may not refer to the first stsd entry. This is the case in h264/thezerotheorem-cut.mp4, and as such the fate-h264_redundant_pps-side_data test is updated accordingly. Signed-off-by: James Almer <jamrial@gmail.com>
Revert "avformat/tls_openssl: properly get new BIO index" BIO_get_new_index() is static counter meant to get index for custom bio type definition. As we can read in the documentation: > Note that BIO_get_new_index() can only be used 127 times before it > returns an error. We cannot call it repeatedly, because it will fail eventually. To my understanding the index is not needed in our use and we could safely use BIO_TYPE_NONE. Documentation states: > type can be set to either BIO_TYPE_NONE or via BIO_get_new_index() if > a unique type is required for searching (See BIO_find_type(3)) We don't use any search related functions. This reverts commit 816dad231f5b312fd98e81cc6a6cbaf47c1e26a5. Fixes: https://github.com/mpv-player/mpv/issues/16589 Signed-off-by: Kacper Michaj?ow <kasper93@gmail.com>
avcodec/cbs_apv_syntax_template: Check tile_data_size Fixes: heap-buffer-overflow Fixes: 418421333/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APV_fuzzer-6592025183191040 Fixes: 418804929/clusterfuzz-testcase-minimized-ffmpeg_BSF_APV_METADATA_fuzzer-5773904646045696 Fixes: 420737045/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APV_fuzzer-5535272169439232 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
amfenc: Fix for full PA queue Fixes AMF_INPUT_FULL errors with pre-analysis (PA) enabled. Added wait and poll encoder output to free up internal buffers before submitting new frames. Improves stability and performance by accounting for encoder and analysis stage queue limits (incl. lookahead buffering). Reproduce: ffmpeg.exe -y -r 60 -f lavfi -i testsrc=rate=60:size=3840x2160 -t 10 -pix_fmt yuv420p -an -c:v av1_amf -preset:v high_quality -profile:v main -quality:v high_quality -usage:v high_quality