1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

104420 Commits

Author SHA1 Message Date
Limin Wang
00ec682a70 avcodec/hevcdec: set the film grain property if present
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-10-08 10:11:59 +08:00
Limin Wang
9997047a18 avutil/detection_bbox: Fix av_detection_bbox_alloc failed if nb_bboxes == 0
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-10-08 10:11:59 +08:00
Limin Wang
e724004fd8 avutil/detection_bbox: use offsetof for bboxes_offset
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-10-08 10:11:59 +08:00
Michael Niedermayer
f059b56195 avcodec/apedec: Use 64bit to avoid overflow
Fixes: runtime error: signed integer overflow: 727298502 * 3 cannot be represented in type 'int'
Fixes: 39172/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-638602483033702

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-07 23:38:57 +02:00
Michael Niedermayer
ad517ee6e4 avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830()
Fixes: signed integer overflow: -2145648640 - 3357696 cannot be represented in type 'int'
Fixes: 38899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5358815017566208

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-07 23:38:57 +02:00
Michael Niedermayer
255a7b423e oavformat/avidec: Check offset in odml
Fixes: signed integer overflow: 9223372036854775807 + 8 cannot be represented in type 'long'
Fixes: 38787/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-4859845799444480

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-07 23:38:57 +02:00
Michael Niedermayer
83b2e4c8f1 avformat/mpegts: use actually read packet size in mpegts_resync special case
Fixes: infinite loop
Fixes: 37986/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-5292311517462528 -

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-07 23:38:57 +02:00
Andreas Rheinhardt
6e859d2bdb fate/cover-art: Add test for muxing cover arts to FLAC
Also covers muxing and demuxing of nonstandard FLAC channel layouts
and the multi-dim-quant option of the FLAC encoder
(all of which was hitherto uncovered).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 22:09:04 +02:00
Andreas Rheinhardt
fadefe356a avformat/flacdec: Also set channels when setting channel_layout
This brings the FLAC demuxer in line with all the other demuxers.
Furthermore, if it is not done and the FLAC decoder is disabled,
the FLAC parser will overwrite the channel layout with the standard
channel layout for that number of channels.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 22:06:27 +02:00
Andreas Rheinhardt
0a0204c48a tests/fate-run: Allow multiple inputs for transcode()
This allows nicer tests by having a greater range of inputs available
(without requiring adding further samples to the fate-suite).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 21:54:30 +02:00
Michael Niedermayer
cc721fc292 avcodec/amr_parser: Treat 0 channels as 1
Fixes: division by 0
Fixes: 39562/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMRWB_fuzzer-5448834960982016
Fixes: 39589/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMRWB_fuzzer-6119205334810624

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-07 19:37:05 +02:00
Timo Rothenpieler
1831fa7278 avfilter/sharpen_npp: use FILTER_SINGLE_PIXFMT 2021-10-07 19:01:25 +02:00
Paul B Mahol
7529781ba8 avfilter/af_axcorrelate: fix typo 2021-10-07 18:36:36 +02:00
Timo Rothenpieler
37745b4904 avfilter/scale_npp: fix non-aligned output frame dimensions 2021-10-07 18:07:53 +02:00
Roman Arzumanyan
ed084161ba avfilter/sharpen_npp: add sharpening video filter with borders control
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-10-07 18:07:53 +02:00
Andreas Rheinhardt
3e022d185c fate/subtitles: Add scc remux test
Provides coverage for the muxer.
(Thanks to tresh for modifying the whitespace commit hook
to allow to push this ref file with tabs.)

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 17:56:58 +02:00
Andreas Rheinhardt
37cb26bf79 avfilter/vf_thumbnail_cuda: Reindent after the previous commit
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 16:41:21 +02:00
Andreas Rheinhardt
06045f4b1d avfilter/vf_thumbnail_cuda: Fix segfaults on uninit
Uninit crashed if an array containing frames could not be allocated
or config_props() has never been called.

Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 16:38:04 +02:00
Andreas Rheinhardt
baf89ab9a7 avformat/format: Improve const-correctness
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 14:06:58 +02:00
Andreas Rheinhardt
05c1f78a72 avfilter/aeval: Fix leak of expressions upon reallocation error
Fix this by switching to av_dynarray_add_nofree() which is more
natural anyway because the entries of the array are pointers.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 12:50:18 +02:00
Andreas Rheinhardt
bae96fa977 avfilter/af_vibrato: Fix segfault upon allocation error
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 12:50:01 +02:00
Andreas Rheinhardt
0429d8eed8 avfilter/af_surround: Fix memleaks upon allocation error
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 12:49:49 +02:00
Andreas Rheinhardt
cd1aaec760 avfilter/vf_w3fdif: Fix segfault on allocation error
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 12:49:29 +02:00
Andreas Rheinhardt
b6aeee2d8b examples/remuxing: Fix use of uninitialized value
Fixes Coverity ticket 1492326.
Regression since 53f374c08d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 11:59:31 +02:00
Andreas Rheinhardt
5e1b5b52fe avcodec/aliaspixenc: Remove redundant counter
Improves performance by 33.8% for BGR24 and by 26.4% for GRAY8.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 11:57:23 +02:00
Andreas Rheinhardt
66f4685910 fate/image: Modify aliaspix tests to also cover the encoder
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 11:56:53 +02:00
Andreas Rheinhardt
14baf4cd92 avformat/lrcenc: Unify writing timestamps
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 11:55:55 +02:00
Andreas Rheinhardt
e110076d8c avformat/lrcenc: Avoid allocations for writing packet data
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 11:54:28 +02:00
Andreas Rheinhardt
1307089523 fate/subtitles: Add remuxing test for lrc
It uses the test-lrc.lrc sample which was added years ago, but never
used until now.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 11:52:56 +02:00
Andreas Rheinhardt
2f4dfe861d tests/fate-run: Set bitexact flag for output, too
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 11:52:10 +02:00
Andreas Rheinhardt
07bf8f8332 avformat/sccdec: Remove nonsense cast
In most contexts, arrays are automatically converted to a pointer
to their first element; taking the address of the array just yields
a pointer to an array of fixed-size arrays, which is not intended here.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 11:52:10 +02:00
Andreas Rheinhardt
c9b44a79d1 avcodec/rasc: Fix potential use of uninitialized value
Fixes Coverity issue #1439566.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 11:34:20 +02:00
Paul B Mahol
4c7fec5006 avfilter/vf_v360: fix dfisheye input regression 2021-10-06 23:48:45 +02:00
Paul B Mahol
21979cf98e avfilter/vf_morpho: fix leak by not returning too early 2021-10-05 20:13:13 +02:00
Michael Niedermayer
07e4669053 avcodec/wmaprodec: Do not initialize unused variable to out of array value
Fixes: out of array read
Fixes: 39452/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA2_fuzzer-4678745030524928.fuzz

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-05 20:06:42 +02:00
Andreas Rheinhardt
31a373ce71 avfilter: Reindentation after query_formats changes
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00
Andreas Rheinhardt
71f9f7dc73 avfilter/vf_morpho: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00
Andreas Rheinhardt
3a25adb895 avfilter/vf_removelogo: Store format in filter, remove query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00
Andreas Rheinhardt
4c0adcd07e avfilter/vulkan: Store format in filter, remove query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00
Andreas Rheinhardt
be8bc645b6 avfilter/opencl: Store format in filter, remove query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00
Andreas Rheinhardt
94047d6aa5 avfilter/vf_bbox: Use formats list instead of query func
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00
Andreas Rheinhardt
32777acb36 avfilter/vf_bilateral: Use formats list instead of query func
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00
Andreas Rheinhardt
dc465efdf8 avfilter/vf_bitplanedenoise: Use formats list instead of query func
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00
Andreas Rheinhardt
90e3948c75 avfilter/vf_blackdetect: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00
Andreas Rheinhardt
f5362d3da1 avfilter/vf_blend: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00
Andreas Rheinhardt
5f2e8fc4c8 avfilter/vf_bm3d: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00
Andreas Rheinhardt
78f5f8a20f avfilter/vf_bwdif: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00
Andreas Rheinhardt
ee73c8bf63 avfilter/vf_cas: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00
Andreas Rheinhardt
7709c3eb0c avfilter/vf_chromanr: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00
Andreas Rheinhardt
c0d6a18294 avfilter/vf_colorbalance: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05 18:58:29 +02:00