1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00
Commit Graph

5219 Commits

Author SHA1 Message Date
Michael Niedermayer
77fbef0fdd
avfilter/vf_vidstabdetect: Avoid double AVERRORS
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bb04235d72)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 23:09:19 +01:00
Michael Niedermayer
e08f712507
avfilter/vf_gradfun: Do not overread last line
The code works in steps of 2 lines and lacks support for odd height
Implementing odd height support is better but for now this fixes the
out of array access

Fixes: out of array access
Fixes: tickets/10702/poc6ffmpe

Found-by: Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e4d2666bdc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 02:37:15 +01:00
Paul B Mahol
4f566654e7 avfilter/vf_random: fix memory leaks
Fixes #8296

(cherry picked from commit 3488e0977c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:35:13 +02:00
Paul B Mahol
a19796a15e avfilter/vf_edgedetect: fix heap-buffer overflow
Fixes #8275

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

(cherry picked from commit 0e68e8c93f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:24:00 +02:00
Paul B Mahol
ff73a50456 avfilter/vf_edgedetect: check if height is big enough
Fixes #8260

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

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

Fixes #8239

(cherry picked from commit ce5274c138)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:35:04 +02:00
Michael Niedermayer
bc5dde5ec0 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 7971f62120)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bb08ee0c6fb7bdebd37cbf00aefed206909e8f78)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-17 21:34:53 +02:00
Michael Niedermayer
17811e6d40 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 1cf96ce269)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-17 21:34:53 +02:00
Michael Niedermayer
9c151e45a8 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 0c0ca0f244)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-04-23 21:29:01 +02:00
Michael Niedermayer
06f4f0d613 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 dfc4714886)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-04-23 21:29:01 +02:00
Michael Niedermayer
db8487611b 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 6ff2474e02)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-04-23 21:29:01 +02:00
Michael Niedermayer
560770d32b 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 c8813b1a98)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-06 20:30:57 +01:00
Paul B Mahol
8abdfe8392 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 2d1594a8d6)
2019-01-25 00:56:50 +01:00
Michael Niedermayer
ed06873b7b 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 c6939f65a1)
(cherry picked from commit 3f621455d6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-31 23:47:15 +01:00
Kelly Ledford
b6731e87c8 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 bc219082bb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-31 22:56:14 +01:00
Jun Zhao
15df68bf50 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 4280948702)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-31 22:56:14 +01:00
Michael Niedermayer
60bc8b6282 avfilter/vf_uspp: Fix currently unused input frame dimensions
Found-by: Nicolas
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 942036e97c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-20 03:41:33 +02:00
Michael Niedermayer
cbd0036856 avfilter/avfiltergraph: Add assert to write down in machine readable form what is assumed about sample rates in swap_samplerates_on_filter()
Fixes CID1397292

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5f2b360fc0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-20 03:41:33 +02:00
Moritz Barsnick
b480ca4dbd lavfi: fix typos
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f4e4bde1f4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:25 +01:00
Michael Niedermayer
087bd8fbdf avfilter/vf_telecine: Make frame writable before writing into it
Fixes Ticket 5627

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fa0097e008)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
76fd8145a1 avfilter/af_amix: dont fail if there are no samples in output_frame()
Fixes Ticket5326

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit abc957e896)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
c6e3682a0c avfilter/vf_drawtext: Check return code of load_glyph()
Fixes segfault
Fixes Ticket5347

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2e67a99fbc)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-27 04:40:12 +02:00
Marios Titas
21fb4d1282 avfilter/src_movie: fix how we check for overflows with seek_point
Currently, if the movie source filter is used and a seek_point is
specified on a file that has a negative start time, ffmpeg will fail.

An easy way to reproduce this is as follows:
$ ffmpeg -vsync passthrough -filter_complex 'color=d=10,setpts=PTS-1/TB' test.mp4
$ ffmpeg -filter_complex 'movie=filename=test.mp4:seek_point=2' -f null -

The problem is caused by checking for int64_t overflow the wrong way.
In general, to check whether a + b overflows, it is not enough to do:
    a > INT64_MAX - b
because b might be negative; the correct way is:
    b > 0 && > a > INT64_MAX - b

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c1f9734f97)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-27 04:40:11 +02:00
Thomas Mundt
3fb97a01ce avfilter/vf_scale: set proper out frame color range
Prevents that following scalers in the filter chain will do unintentional color range conversions.
Fixes Ticket #5096

Signed-off-by: Thomas Mundt <loudmax@yahoo.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 73ce8162f3)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 12:30:40 +01:00
Paul B Mahol
6a1bf98b3a avfilter/vf_zoompan: do not free frame we pushed to lavfi
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 8bcd1997ea)

Fixes ticket #5113.
2016-01-02 21:21:43 +01:00
Michael Niedermayer
e4a6a8553e avfilter/vf_mpdecimate: Add missing emms_c()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 997de2e810)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-17 21:32:17 +01:00
Andreas Cadhalpun
13d3749424 doc: fix spelling errors
Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 8d6625642d)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-10-12 21:46:54 +02:00
Paul B Mahol
fb0d41932d avfilter/af_ladspa: process all channels for nb_handles > 1
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit dc1050a3e8)
2015-09-16 12:50:13 +00:00
Ganesh Ajjanagadde
aa661d3672 avfilter/af_asyncts: use llabs for int64_t
long may not be 64 bit on all platforms; so labs on int64_t is unsafe.
This fixes a warning reported in:
http://fate.ffmpeg.org/log.cgi?time=20150905071512&log=compile&slot=i386-darwin-clang-polly-3.7

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d74123d03e)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-06 12:11:23 +02:00
Michael Niedermayer
8ca97b5e4f avfilter/avf_showfreqs: Fix memleak of out frame
Fixes CID1322344

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-05 15:46:18 +02:00
Michael Niedermayer
0ada8ec1a5 avfilter/avf_showfreqs: Fix "may be used uninitialized in this function" warning
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-05 15:34:35 +02:00
Michael Niedermayer
7213d3fbf3 avfilter/avf_showfreqs: Free fin
Fixes CID1322345

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-05 15:32:00 +02:00
Michael Niedermayer
a3ad51e0d5 avfilter/af_amerge: avoid undefined shift (<<64) in outlayout setup
Fixes CID1322306

Reviewed-by: Ganesh Ajjanagadde <gajjanag@mit.edu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-05 15:14:09 +02:00
Michael Niedermayer
7eab904d11 avfilter/vf_stack: Fix memleak of out frame
Fixes CID1322347

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-05 14:41:45 +02:00
Michael Niedermayer
5d859e5980 avfilter/avfilter: Add a few more basic filters to the list which support frame size changes
Fixes assertion failures

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-05 11:43:27 +02:00
Paul B Mahol
f011e98cb1 avfilter/vf_vectorscope: change intensity to float
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-04 18:47:46 +00:00
Paul B Mahol
db592f3b03 avfilter/vf_waveform: stop abusing s->size for calculating limit
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-04 17:34:23 +00:00
Paul B Mahol
55886c67e7 avfilter/vf_waveform: change intensity to float
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-04 17:14:32 +00:00
Paul B Mahol
fda05554e3 avfilter/vf_waveform: reduce number of operations a little
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-04 17:07:08 +00:00
Paul B Mahol
5b658bcc8a avfilter/vf_waveform: 9 and 10 bit depth support for lowpass & color filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-04 17:07:08 +00:00
Michael Niedermayer
f5a6a8336f avfilter/af_channelmap: Reorder operations to avoid memleak
Fixes CID1322346
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-04 00:10:41 +02:00
Michael Niedermayer
59361d8c9d avfilter/af_sidechaincompress: Also assert that i < 2
This should help static analyzers (CID1322339)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-03 23:13:24 +02:00
Michael Niedermayer
d5710411c7 avfilter/vf_atadenoise: Check for ff_get_video_buffer() failure
Fixes CID1322338

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-03 23:07:43 +02:00
Michael Niedermayer
c97ea011f5 avfilter/vf_histogram: Fix order of operations with flags
Fixes CID1322325

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-03 23:02:03 +02:00
Michael Niedermayer
a212a983c7 avfilter/avf_showwaves: Check max_samples
Fixes potential division by zero
Fixes: CID1292295

Reviewed-by: Ganesh Ajjanagadde <gajjanag@mit.edu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-03 19:27:20 +02:00
Michael Niedermayer
92b3c486b0 avfilter/af_dynaudnorm: Fix typo in assert
Fixes: CID1322303

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-03 18:55:06 +02:00
Michael Niedermayer
629fcda4da avfilter/avf_showfreqs: Use floating point division in WFUNC_BHANN
Fixes: CID1322365

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-03 18:54:14 +02:00
Ganesh Ajjanagadde
c0ae4619ec avfilter/vf_sab: use the name 's' for the pointer to the private context
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-09-03 09:47:44 +00:00