1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00

6647 Commits

Author SHA1 Message Date
Michael Niedermayer
aed958c060 avfilter/vf_signature: Fix integer overflow in filter_frame()
Fixes: CID1403233

The second of the 2 changes may be unneeded but will help coverity

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit dd6040675ec18d19429f882caea6bb306ed6677a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-07-12 23:10:35 +02:00
Michael Niedermayer
8775295080 avfilter/vsrc_mandelbrot: Check for malloc failure
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fbd22504c4148d2a01ccfe38df26c144f56db76b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-06-14 16:56:57 +02:00
Michael Niedermayer
0a3a33311e avfilter/vf_frei0r: Copy to frame allocated according to frei0r requirements
Fixes: issues with non trivial linesize

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d353909e773ba8a8201fa13d6c35251351dd567a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-06-14 16:55:15 +02:00
Michael Niedermayer
1e99ff9d33 avfilter/video: Add ff_default_get_video_buffer2() to set specific alignment
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d74078270198b97fdda258840f0d501a3ffcc693)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-06-14 16:54:58 +02:00
Paul B Mahol
ee981f7ceb avfilter/vf_colorspace: fix memmory leaks
Fixes #8303

(cherry picked from commit fddef964e8aa4a2c123e470db1436a082ff6bcf3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:57:06 +02:00
Paul B Mahol
ac6c213c4e avfilter/vf_random: fix memory leaks
Fixes #8296

(cherry picked from commit 3488e0977c671568731afa12b811adce9d4d807f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:34:58 +02:00
Paul B Mahol
16eb9939ea avfilter/vf_bwdif: fix heap-buffer overflow
Fixes #8261

(cherry picked from commit 8c3166e1c302c3ba80d9742ae46161c0fa8e2606)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:31:57 +02:00
Paul B Mahol
222783e2fa avfilter/vf_edgedetect: fix heap-buffer overflow
Fixes #8275

(cherry picked from commit de598f82f8c3f8000e1948548e8088148e2b1f44)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:25:28 +02:00
Paul B Mahol
da58e7fb9e avfilter/vf_w3fdif: deny processing small videos
Fixes #8243

(cherry picked from commit 0e68e8c93f9068596484ec8ba725586860e06fc8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:23:47 +02:00
Paul B Mahol
cde751ce49 avfilter/vf_avgblur: fix heap-buffer overflow
Fixes #8274

(cherry picked from commit f069a9c2a65bc20c3462127623127df6dfd06c5b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:49:23 +02:00
Paul B Mahol
c5629402fa avfilter/af_tremolo: fix heap-buffer overflow
Fixes #8317

(cherry picked from commit 58bb9d3a3a6ede1c6cfb82bf671a5f138e6b2144)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:47:02 +02:00
Paul B Mahol
3ee76a3ddb avfilter/vf_edgedetect: check if height is big enough
Fixes #8260

(cherry picked from commit ccf4ab8c9aca0aee66bcc2914031a9c97ac0eeb8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:42:52 +02:00
Paul B Mahol
c1ce4fba51 avfilter/vf_bitplanenoise: fix overreads
Fixes #8244

(cherry picked from commit 0b567238741854b41f84f7457686b044eadfe29c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:40:16 +02:00
Paul B Mahol
c72ed4f3eb avfilter/vf_fieldorder: fix heap-buffer overflow
Fixes #8264

(cherry picked from commit 07050d7bdc32d82e53ee5bb727f5882323d00dba)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:37:30 +02:00
Paul B Mahol
278f86ece9 avfilter/vf_fieldmatch: fix heap-buffer overflow
Also fix use of uninitialized values.

Fixes #8239

(cherry picked from commit ce5274c1385d55892a692998923802023526b765)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:34:31 +02:00
Paul B Mahol
07cb2c8863 avfilter/vf_lenscorrection: make width/height int
Somehow previous correct fix broke usage.

(cherry picked from commit 79522411fa53b68743302d16d28156db95466a21)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-13 23:39:50 +02:00
Oneric
1c73b96c21 avfilter/vf_subtitles: pass storage size to libass
Due to a quirk of the ASS format some tags depend on the exact storage
resolution of the video, so tell libass via ass_set_storage_size.
2022-04-13 23:39:50 +02:00
Paul B Mahol
b239ccff7d avfilter/vf_gblur: fix heap-buffer overflow
Fixes #8282

(cherry picked from commit 64a805883d7223c868a683f0030837d859edd2ab)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-13 23:39:50 +02:00
Paul B Mahol
32a384519a avfilter/vf_lenscorrection: fix division by zero
Fixes #8265

(cherry picked from commit 19587c9332f5be4f6bc6d7b2b8ef3fd21dfeaa01)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-13 23:39:50 +02:00
Timo Rothenpieler
11388838ff avfilter/scale_npp: fix non-aligned output frame dimensions 2021-10-07 18:39:44 +02:00
Michael Niedermayer
7590dbf9be avfilter/vf_mestimate: Check b_count
Fixes: left shift of negative value -1
Fixes: Ticket8270

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 06af6e101bbd04e8ecc5337bc3b6894a5e058e14)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-12 11:22:04 +02:00
Michael Niedermayer
58bbb40b72 avfilter/vf_dctdnoiz: Check threads
Fixes: floating point division by 0
Fixes: Ticket 8269

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4a3917c02c428b11128ac3d4a01b780ea44aa53c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-11 21:23:49 +02:00
Michael Niedermayer
a2d45c6b9a avfilter/vf_ciescope: Fix undefined behavior in rgb_to_xy() with black
Fixes: floating point division by 0
Fixes: undefined behavior in handling NaN
Fixes: Ticket 8268

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3d500e62f6206ad11308b18976246366aed8c1a5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-11 21:23:49 +02:00
Michael Niedermayer
1c5391ce1c avfilter/vf_yadif: Fix handing of tiny images
Fixes: out of array access
Fixes: Ticket8240
Fixes: CVE-2020-22021

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7971f62120a55c141ec437aa3f0bacc1c1a3526b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bb08ee0c6fb7bdebd37cbf00aefed206909e8f78)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-11 21:23:49 +02:00
Michael Niedermayer
c2ae301888 avfilter/vf_vmafmotion: Check dimensions
Fixes: out of array access
Fixes: Ticket8241
Fixes: Ticket8246
Fixes: CVE-2020-22019
Fixes: CVE-2020-22033

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 82ad1b76751bcfad5005440db48c46a4de5d6f02)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-11 21:23:49 +02:00
Michael Niedermayer
5ca2ee38e8 avfilter/vf_scale: Fix adding 0 to NULL (which is UB) in scale_slice()
Found-by: Jeremy Leconte <jleconte@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1cf96ce269364e3c2b4ec2097f121ad42b336839)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-11 21:23:49 +02:00
Andreas Rheinhardt
59b73dc1f3 avfilter/vf_xbr: Fix left shift of negative number
Affected every usage of vf_xbr, e.g. the FATE-tests filter-2xbr,
filter-3xbr, filter-4xbr.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4294dc3589a3ab973b10a85b576ff15e3ffb000d)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-03 00:03:45 +02:00
Andreas Rheinhardt
9eeef68b50 avfilter/vf_hqx: Fix undefined left shifts of negative numbers
Affected every usage of this filter; in particular, it affected the
FATE-tests filter-2xbr, filter-3xbr and filter-4xbr.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fa211943265ca991548a4cc2f85a6df9cedcd092)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-03 00:03:45 +02:00
Michael Niedermayer
4f04fa75dd avfilter/vf_aspect: Fix integer overflow in compute_dar()
Fixes: signed integer overflow: 1562273630 * 17 cannot be represented in type 'int'
Fixes: Ticket8323

Found-by: Suhwan
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0c0ca0f244b823238e5a4f5584168e620da84899)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-02 19:55:09 +02:00
Michael Niedermayer
cb9ec725c3 avfilter/vf_find_rect: Remove assert
A score of 0 is possible
Fixes: Ticket8500

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit dfc471488675aa257183745502d0074055db3bd2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-02 19:55:09 +02:00
Michael Niedermayer
bd8633d4d3 avfilter/vf_find_rect: Increase worst case score
score could be 1.0 which lead to uninitialized values

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6ff2474e02200dce7abdea3fd211fcaf49691c2c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-02 19:55:09 +02:00
Michael Niedermayer
386b987f2a avfilter/vf_geq: Use av_clipd() instead of av_clipf()
With floats we cannot represent all 32bit integer dimensions

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c8813b1a984714f0027cabeea2394035df20cf38)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Paul B Mahol
15b385efca avfilter/af_silenceremove: fix possible crash if supplied duration is negative
Signed-off-by: Paul B Mahol <onemda@gmail.com>

Fixes ticket #7697.
(cherry picked from commit 2d1594a8d6a754a426cb53184dccf9cf8c8a94b0)
2019-01-25 01:01:42 +01:00
Michael Niedermayer
43916494f8 avfilter/vf_signature: use av_strlcpy()
Fixes: out of array access

Found-by: Kira <kira_cxy@foxmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 35eeff30caf34df835206f1c12bcf4b7c2bd6758)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-18 01:16:03 +02:00
Michael Niedermayer
2980b95faf avfilter/vf_transpose: Fix used plane count.
Fixes out of array access
Fixes: poc.mp4

Found-by: GwanYeong Kim <gy741.kim@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c6939f65a116b1ffed345d29d8621ee4ffb32235)
(cherry picked from commit 3f621455d62e46745453568d915badd5b1e5bcd5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-28 15:33:09 +01:00
Jun Zhao
7b56d6584c lavfi/deinterlace_vaapi: fix can't show full option information.
use ffmpeg -h filter=deinterlace_vaapi can't get full help information,
the root cause is not setting the flags fileld in options.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 383804edd812410219a097e2bf3efac8a8b4562a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-28 15:33:09 +01:00
Kelly Ledford
a3832486e4 libavfilter/af_dcshift.c: Fixed repeated spelling error
'threshhold' should be 'threshold'

Signed-off-by: Kelly Ledford <kelly.ledford@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bc219082bb04b9a4725bfe7e78ce0950244e6e84)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-28 15:31:13 +01:00
Jun Zhao
9aa0ed850b avfilter/formats: fix wrong function name in error message
Use perdefined micro __FUNCTION__ rather than hard coding function name
to fix wrong function name in error message.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4280948702bc256e21c375790b889c735d233b0d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-28 15:31:13 +01:00
Michael Roitzsch
752659ff1e lavfi/af_pan: fix sign handling in channel coefficient parser
When a channel formula ends with a subtraction, the next formula will
otherwise have its first coefficient negated.

(cherry picked from commit 4f4e19914ddca5096bf7639c7c99a9045e436e8b)
2017-11-21 14:04:10 +01:00
Michael Niedermayer
e1de9eab3a Bump minor versions for branching 3.4
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-11 01:23:47 +02:00
Mark Thompson
e339411691 vaapi: Always free parameter buffers after vaEndPicture() with libva2
This is an ABI change in libva2: previously the Intel driver had this
behaviour and it was implemented as a driver quirk, but now it is part
of the specification so all drivers must do it.
2017-10-09 00:11:53 +01:00
Carl Eugen Hoyos
5d3e935728 lavfi: Rename local variables "main" as "master".
Silences several warnings:
main is usually a function
2017-10-07 20:49:48 +02:00
Sasi Inguva
123f6dc6b5 lavfi/avfilter.c: Correct guess_status_pts to account for differing link timebases.
Signed-off-by: Sasi Inguva <isasi@google.com>
2017-10-07 11:17:23 +02:00
Tobias Rapp
62bdec806e avfilter/vf_fps: add eof_action filter option
Allows to specify the action to be performed when reading the last frame
from the internal FIFO buffer. By default the last frame is written to
filter output depending on the timestamp rounding method. When using
"pass" action the last frame is passed through if input duration
has not been reached yet.

Examples using an input file with 25Hz, 1.4sec duration:
 - "fps=fps=1:round=near" generates an output file of 1sec
 - "fps=fps=1:round=near:eof_action=pass" generates an output file of
   2sec

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2017-10-06 17:11:20 +02:00
Tobias Rapp
0a499d6a57 avfilter/vf_fps: clean-up filter options
Add missing AV_OPT_FLAG_FILTERING_PARAM flag to "start_time" option.
Fix indent of "round" named constants and clear unused field values.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2017-10-05 10:33:55 +02:00
Carl Eugen Hoyos
59924d5eb1 lavfi/vmafmotion: Allow more pix_fmts. 2017-10-01 20:53:43 +02:00
Michael Niedermayer
d679f3d021 avfilter/vf_thumbnail_cuda: Avoid mixing declaration and statements
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-01 02:36:00 +02:00
James Almer
67057aaeb2 avfilter/vmaf_motion: use correct header guards
Fixes fate-source

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-30 15:38:09 -03:00
Ashish Singh
148c8e88c4 avfilter: add vmafmotion filter
Signed-off-by: Ashish Singh <ashk43712@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-09-30 11:47:59 -04:00
James Almer
5256a86da0 Merge commit '5c8a5765dc5f4e29afb85b95be393c30f45412a8'
* commit '5c8a5765dc5f4e29afb85b95be393c30f45412a8':
  scale_npp: explicitly set the output frames context for passthrough mode

See 62b75537db15816fde8b8a33976ffc4a8277f1fc

Merged-by: James Almer <jamrial@gmail.com>
2017-09-27 20:59:14 -03:00