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

92720 Commits

Author SHA1 Message Date
Michael Niedermayer
ee349bd0fd avcodec/tiff: Limit filtering to decoded data
Fixes: Timeout
Fixes: 11068/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5698456681709568

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 90ac0e5f29ba4730cd92d3268938b3730823e52b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-21 07:53:25 +01:00
Michael Niedermayer
ab744447e1 avcodec/truemotion2: fix integer overflows in tm2_low_chroma()
Fixes: 11295/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-4888953459572736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2ae39d795613f3c6925c59852b625029b747fe42)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-21 07:53:25 +01:00
Michael Niedermayer
89d65915cf avcodec/pngdec: Check compression method
method 0 (inflate/deflate) is the only specified in the specification and the only supported

Fixes: Timeout
Fixes: 10976/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PNG_fuzzer-5729372588736512

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1f99674ddddcc33f4c37def0a206e31ad7c4c1af)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-21 07:53:25 +01:00
Michael Niedermayer
e69bb0fb05 fftools/ffmpeg: Repair reinit_filter feature
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 35040048793bc5d19942277fe17d1235e915a7d8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-21 07:53:25 +01:00
Michael Niedermayer
98a9d868d1 avcodec/shorten: Fix integer overflow with offset
Fixes: signed integer overflow: -1625810908 - 582229060 cannot be represented in type 'int'
Fixes: 10977/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5732602018267136

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2f888771cd1ce8d68d4b18a1009650c1f260aaf2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-21 07:53:25 +01:00
Michael Niedermayer
b66152a4e5 avcodec/imm4: Use ff_set_dimensions()
Fixes: Out of memory
Fixes: 10970/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IMM4_fuzzer-5698750043914240

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c305e134ce23b46a1164527ade3e1b7e2ecedf5f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-21 07:53:25 +01:00
Andreas Rheinhardt
ac50246cc4 h264_redundant_pps: Fix logging context
The first element of H264RedundantPPSContext is not a pointer to an
AVClass as required.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6dafcb6fdb6271d35220b889833561705c2b366f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-21 07:53:25 +01:00
Marton Balint
ddc284300e avfilter/af_asetnsamples: fix last frame props
Frame properties were not copied, so e.g. PTS was not set for the last frame.

Regression since ef3babb2c70f564dc1634b3f29c6e35a2b2dc239.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit f9e947845f9ac5ccb84cf5e6f4121ec2e23b9946)
2019-01-01 20:39:44 +01:00
Mark Thompson
b420f23566 cbs_av1: Fix reading of overlong uvlc codes
The specification allows 2^32-1 to be encoded as any number of zeroes
greater than 31, followed by a one.  This previously failed because the
trace code would overflow the array containing the string representation
of the bits if there were more than 63 zeroes.  Fix that by splitting the
trace output into batches, and at the same time move it out of the default
path.

(While this seems likely to be a specification error, libaom does support
it so we probably should as well.)

From a test case by keval shah <skeval65@gmail.com>.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b97a4b658814b2de8b9f2a3bce491c002d34de31)
2018-12-22 18:28:41 +00:00
James Almer
5356e61001 avcodec/cbs_av1: fix parsing delta_frame_id_minus1
delta_frame_id_minus1 is not a single value in the bitstream, and can
store values up to 17 bits wide.

Fixes parsing files with frame ids.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 064f9505f49816650516c7afe93e43d8f547891a)
2018-12-20 18:29:42 -03:00
Paul B Mahol
a4ddc3c9fc avfilter/vf_overlay: fix filtering with negative y
(cherry picked from commit 8440835dbe93ef9972ceb940af9bda9bc0e178e7)
2018-12-14 23:56:21 +01:00
Paul B Mahol
59e30c05d7 avformat/movenc: get number of written bytes from bitstream writer
Update fate test.

(cherry picked from commit 97d1ee437bbf67d7e3897bc73df4f7d9771ac309)
2018-11-26 15:36:12 +01:00
Paul B Mahol
fcffed470a avformat/movenc: fix size calculation in mov_write_eac3_tag()
Otherwise it would assert when flushing bits.

(cherry picked from commit 027f032bbce9bdf7bbec40665b98590cade33416)
2018-11-26 15:36:05 +01:00
Paul B Mahol
9efc591cb7 avfilter/vf_overlay: fix crash with negative y
(cherry picked from commit 57815cfad5c5d6beb6f3fc0ae86b050a970d3a08)
2018-11-25 12:46:56 +01:00
Marton Balint
d4c5f515f0 avcodec/mpeg_er: fix clearing chroma blocks for 422 and 444
Fixes ticket #7494.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit e3a96309826dd0ea33db0300f7c75414fdbea0a4)
2018-11-19 23:29:30 +01:00
Marton Balint
bb01cd3cc0 avfilter/af_afade: fix duration maximum
Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit aecd63b926812148014c4f01270473722ae5e945)
2018-11-15 22:34:53 +01:00
Mark Harris
fed94c2f22 avfilter/vf_fade: fix start/duration max value
A fade out (usually at the end of a video) can easily start beyond
INT32_MAX (about 36 minutes).  Regression since d40dc64173.

(cherry picked from commit ae4323548ae821db81b73bc66cf5a2f9885296cb)
2018-11-15 22:34:34 +01:00
James Almer
a9e9303f26 avcodec/cbs_av1: fix parsing signed integer values
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit f0f2832a5ce93bad9b1d29f99df6bda2380fc41c)
2018-11-14 20:53:44 -03:00
James Almer
49bc641e89 avcodec/cbs_av1: fix storage size for segmentation_params feature_value fields
The valid range is -255 to 255.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 79831f4531d98c3c1eab96c10f1135d08abef5f3)
2018-11-14 20:53:40 -03:00
Mark Thompson
4f1e07090a configure: Add missing xlib dependency for VAAPI X11 code
Fixes #7538.

(cherry picked from commit 2ce3a48f30fe3cec7153aa3f18a1012a366aca3a)
2018-11-14 23:24:51 +00:00
Mark Wu
11dff170ef avcodec/hevcdec: fix non-ref frame judgement
After inspecting the source code of x265, mpv and ffmpeg, I've found that
ffmpeg mistakenly regards EVC_NAL_BLA_N_LP and HEVC_NAL_IDR_N_LP as non-
reference frames, which are acutally reference frames according to the
specification in x265, and drops them.

This patch should address the problem. I have tested it with mpv.

Signed-off-by: Mark Wu <wfwf1997@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 10bc4c3a7df7bb26303067b97311b7eeedfd453e)
2018-11-10 14:38:25 -03:00
Mark Thompson
10506de9ad cbs_av1: Support redundant frame headers
(cherry picked from commit f5894178fb8063ec17c61c04df96a70607ca2daa)
n4.1
2018-11-05 23:11:03 +00:00
Mark Thompson
af3fccfeff cbs_av1: Fix header writing when already aligned
(cherry picked from commit 6bdb7712ae0267ba4f69c7434d2b3dee12762d1d)
2018-11-05 23:10:57 +00:00
Mark Thompson
ec1b5216fc configure: Add missing V4L2 M2M decoder BSF dependencies
(cherry picked from commit e9d2e3fdaacb6872dd689ffd5a65e476b70dee3d)
2018-11-05 23:10:49 +00:00
Mark Thompson
066ff02621 configure: Add missing IVF muxer BSF dependency
(cherry picked from commit a4fb2b115071220f23ad7b3d82037647e94279ed)
2018-11-05 23:10:41 +00:00
James Almer
398a70309e avcodec/cbs_av1: fix decoder/encoder_buffer_delay variable types
buffer_delay_length_minus_1 is five bits long, meaning decode_buffer_delay and
encoder_buffer_delay can have values up to 32 bits long.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 89a0d33e3a53e8edefd734b131a7035d13052947)
2018-11-04 22:06:20 -03:00
Mark Thompson
acd13f1255 configure: Fix av1_metadata BSF dependency
(cherry picked from commit 34429182b93123a25e38819ef15bdae42793209f)
2018-11-04 22:06:11 -03:00
James Almer
1c98cf4ddd avformat/ivfenc: use the av1_metadata bsf to insert Temporal Delimiter OBUs if needed
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 2d2af23349cae0d84c8ed51c249bfc1e6f2e28a2)
2018-11-04 22:06:08 -03:00
Marton Balint
63c1e291ef avformat/ftp: allow nonstandard 202 reply to OPTS UTF8
Fixes ticket #7481.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 8e5a2495a8dad262e0a00fbca09b7779b4ebf0bf)
2018-11-04 22:55:09 +01:00
Michael Niedermayer
7ebc27e1fa avcodec/cavsdec: Propagate error codes inside decode_mb_i()
Fixes: Timeout
Fixes: 10702/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CAVS_fuzzer-5669940938407936

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c1cee0565692c541f589aefd7f375d37f55b9d94)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-04 20:26:49 +01:00
Michael Niedermayer
bc5777bdab avcodec/mpeg4videodec: Clear partitioned frame in decode_studio_vop_header()
partitioned_frame is also set/cleared in decode_vop_header()

Fixes: out of array read
Fixes: 9789/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5638681627983872

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 074187d599a2ece2bdf77bd08b4b797c5800eda6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-04 20:26:49 +01:00
Michael Niedermayer
7d23ccac8d avcodec/mpegaudio_parser: Consume more than 0 bytes in case of the unsupported mp3adu case
Fixes: Timeout
Fixes: 10966/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MP3ADU_fuzzer-5348695024336896
Fixes: 10969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MP3ADUFLOAT_fuzzer-5691669402877952

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit df91af140c5543cfbbed187f696e79b554d2c135)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-04 20:26:49 +01:00
Michael Niedermayer
2f04b78b95 avcodec/prosumer: Simplify bit juggling of the c variable in decompress()
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 66425add270cd262a22c0fdaf6aad09a0db6f8c0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-04 20:26:49 +01:00
Michael Niedermayer
fd05e20650 avcodec/prosumer: Remove always true check in decompress()
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1dfa0b6f36d29293f2d0219c4095dc8bb7a4b0dc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-04 20:26:49 +01:00
Michael Niedermayer
a163384467 avcodec/prosumer: Remove unneeded ()
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 506839a3e9cc34c8f719937430008fc12d132fce)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-04 20:26:49 +01:00
Michael Niedermayer
b9875b7583 avcodec/prosumer: Check for bytestream eof in decompress()
Fixes: Infinite loop
Fixes: 10685/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PROSUMER_fuzzer-5652236881887232

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>
(cherry picked from commit 9acdf17b2c30c44e6e6a3d3b3c22989b7e1117c3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-04 20:26:49 +01:00
Philip Langdale
ebc1c49e41 avfilter/vf_cuda_yadif: Avoid new syntax for vector initialisation
This requires a newer version of CUDA than we want to require.

(cherry picked from commit 8e50215b5e02074b0773dfcf55867654ee59c179)
2018-11-03 15:50:31 -07:00
Philip Langdale
6feec11e48 avcodec/nvdec: Increase frame pool size to help deinterlacing
With the cuda yadif filter in use, the number of mapped decoder
frames could increase by two, as the filter holds on to additional
frames.

(cherry picked from commit 1b41115ef70896d9b98ce842dc5f21c465396ce2)
2018-11-03 15:50:25 -07:00
Philip Langdale
67126555fc avfilter/vf_yadif_cuda: CUDA accelerated yadif deinterlacer
This is a cuda implementation of yadif, which gives us a way to
do deinterlacing when using the nvdec hwaccel. In that scenario
we don't have access to the nvidia deinterlacer.

(cherry picked from commit d5272e94ab22bfc8f01fa3174e2c4664161ddf5a)
2018-11-03 15:50:12 -07:00
Philip Langdale
041231fcd6 libavfilter/vf_yadif: Make frame management logic and options shareable
I'm writing a cuda implementation of yadif, and while this
obviously has a very different implementation of the actual
filtering, all the frame management is unchanged. To avoid
duplicating that logic, let's make it shareable.

From the perspective of the existing filter, the only real change
is introducing a function pointer for the filter() function so it
can be specified for the specific filter.

(cherry picked from commit 598f0f39271d6033588b4d8ccc672c5bdc85fec7)
2018-11-03 15:45:55 -07:00
Josh de Kock
765fb1f224 fate/api-h264-slice-test: use cleaner error handling
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 1052578dadf72e400cee5ad2ad5dce899032d362)
2018-11-03 12:57:51 -03:00
Josh de Kock
5060a615c7 fate/api-h264-slice-test: don't use ssize_t
Fixes ticket #7521

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 8096f52049acb1861645815a54435b9fd2d5e77a)
2018-11-03 12:57:37 -03:00
Michael Niedermayer
1665ac6a44 RELEASE_NOTES: Based on the version from 4.0
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-02 01:36:21 +01:00
Michael Niedermayer
3c7e973430 Update for 4.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-02 01:33:08 +01:00
Michael Niedermayer
780d5e30a0 Bump minor versions for branching 4.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-02 00:15:32 +01:00
Michael Niedermayer
324d21164d Changelog: next is 4.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-01 23:54:35 +01:00
Michael Niedermayer
acf4fbddf3 doc/APIchanges: Update for 4.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-01 23:54:26 +01:00
Marton Balint
6a034adf75 avformat/ftp: return AVERROR_EOF for EOF
Without this FTP just hangs on eof...

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-11-01 21:04:57 +01:00
Anton Platov
295fd12d17 avdevice/libndi_newtek_dec: add extra_ips option to libndi_newtek allowing use remote network sources
Signed-off-by: Anton Platov <anton@platov.net>
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-11-01 18:46:05 +01:00
BIGLER Don (Framatome)
cb74c33106 avdevice/decklink_dec: fix codec_tag of RGBA formats
Fixes ticket #7505.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-11-01 18:46:05 +01:00