Commit Graph

85779 Commits

Author SHA1 Message Date
Carl Eugen Hoyos
3624d45ddb compat/strtod: Add missing const qualifiers.
Fixes many warnings:
initialization discards 'const' qualifier from pointer target type
2017-05-04 23:17:20 +02:00
Michael Niedermayer
a78ae465fd avcodec/mjpegdec: Fix runtime error: signed integer overflow: -24543 * 2031616 cannot be represented in type 'int'
Fixes: 943/clusterfuzz-testcase-5114865297391616

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-04 20:42:54 +02:00
Michael Niedermayer
fc4f88375b avcodec/wavpack: Fix invalid shift and integer overflow
Fixes: 940/clusterfuzz-testcase-5200378381467648

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-04 20:32:11 +02:00
Michael Niedermayer
d2657d225c avcodec/flicvideo: Check for chunk overread
Fixes integer overflow
Fixes: 1292/clusterfuzz-testcase-minimized-5795512143839232

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-04 19:52:23 +02:00
Michael Niedermayer
c1c3a14073 libavcodec/mpeg4videodec: Convert sprite_offset to 64bit
This avoids intermediates from overflowing (the final values are checked)
Fixes: runtime error: signed integer overflow: -167712 + -2147352576 cannot be represented in type 'int'

Fixes: 1298/clusterfuzz-testcase-minimized-5955580877340672

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-04 19:49:45 +02:00
Michael Niedermayer
a0296fc056 avcodec/pngdec: Use ff_set_dimensions()
Fixes OOM
Fixes: 1314/clusterfuzz-testcase-minimized-4621997222920192

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-04 18:41:30 +02:00
Michael Niedermayer
cabfed6895 avcodec/msvideo1: Check buffer size before re-getting the frame
Fixes timeout
Fixes: 1306/clusterfuzz-testcase-minimized-6152296217968640

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-04 17:15:43 +02:00
Michael Niedermayer
92f4a4bf29 configure: Do not add omit-frame-pointer for ossfuzz
ossfuzz works better without it

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-04 14:31:20 +02:00
Michael Niedermayer
390c6ee42c tools/target_dec_fuzzer: Fix memleak on open failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-04 13:51:50 +02:00
James Almer
c53bf8c9b8 configure: fix libopus detection
Prevents compilation failures on libopus < 1.0.3
Regression since 37941878.
2017-05-04 00:26:13 -03:00
James Almer
14e092448f avformat/concatdec: port to the new bitstream filter API
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Reviewed-by: Aaron Levinson <alevinsn@aracnet.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-05-03 19:59:49 -03:00
Michael Niedermayer
dec2fa8cc7 tools/target_dec_fuzzer: Use decoder and not codec_id as argument
This allows fuzzing decoders with the same codec_id
We also avoid register all to allow the linker to prune unused sections and symbols

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-03 17:22:13 +02:00
Clément Bœsch
3f17751eeb Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'
* commit '11a9320de54759340531177c9f2b1e31e6112cc2':
  build: Move build-system-related helper files to a separate subdirectory

"ffbuild" directory name is used instead of "avbuild".

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-03 16:49:12 +02:00
Clément Bœsch
c3e0854410 Merge commit 'f9edc734e0ca3f6ef06c1ad0bd2c19c0c66f1ffa'
* commit 'f9edc734e0ca3f6ef06c1ad0bd2c19c0c66f1ffa':
  ratecontrol: Drop xvid-rc-related struct members unused after a6901b9c6

This commit is a noop, see 99b35a51cc

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-03 12:28:54 +02:00
Clément Bœsch
bf0fde84d5 Merge commit '5b26d3b789bd19a32dbe1e9c7ccab9498de7ee9b'
* commit '5b26d3b789bd19a32dbe1e9c7ccab9498de7ee9b':
  nvenc: Update check for lookahead

This commit is a noop, see 67db4ff3b6

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-03 12:28:20 +02:00
Clément Bœsch
9f1bca4e6f Merge commit 'a0c443a3980dc22eb02b067ac4cb9ffa2f9b04d2'
* commit 'a0c443a3980dc22eb02b067ac4cb9ffa2f9b04d2':
  aarch64: vp9itxfm: Use the offset parameter to movrel

This commit is a noop, see 8b11a89c06

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-03 12:26:53 +02:00
Clément Bœsch
9d45454cd0 Merge commit 'fc322d6a70189da24dbd445c710bb214eb031ce7'
* commit 'fc322d6a70189da24dbd445c710bb214eb031ce7':
  tta: Convert to the new bitstream reader
  mlp: Convert to the new bitstream reader
  unary: Convert to the new bitstream reader

This merge is a noop, see
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-April/209609.html

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-03 12:26:20 +02:00
Clément Bœsch
2584656106 Merge commit '45286a625c6ced1f5c4c842244cbb4509429abba'
* commit '45286a625c6ced1f5c4c842244cbb4509429abba':
  h264dec: make sure to only end a field if it has been started

This commit is a noop. Our h264 slicing handling is different and does
not seem to be affected by the issue.

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-03 12:24:41 +02:00
Michael Niedermayer
48b3117844 avcodec/svq3: Reject dx/dy beyond 16bit
The code does use 16bit sized arrays later so larger deltas would not work

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-03 11:57:34 +02:00
Michael Niedermayer
382b4fc9b5 avcodec/svq3: Increase offsets to prevent integer overflows
Fixes: 1280/clusterfuzz-testcase-minimized-6102353767825408

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-03 11:57:34 +02:00
Carl Eugen Hoyos
a75ef1506a lavc/jpeg2000dec: Fix jp2 inner atom size used for overread checks. 2017-05-03 03:45:33 +02:00
James Almer
b3570f0389 avcodec/decode: also check for FF_CODEC_CAP_SETS_PKT_DTS in audio decoders
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-05-02 20:47:33 -03:00
Michael Niedermayer
79aa2ff199 avutil/softfloat: use ldexp(), fixes undefined shift
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-02 22:55:44 +02:00
Muhammad Faiz
c4be288fdb ffmpeg: count packets when queued
Because write_packet() fakely writes packets to muxer by queueing
them when muxer hasn't been initialized, it should also increment
frame_number fakely.
This is required because code in do_streamcopy() rely on
frame_number.

Should fix Ticket6227

Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-05-03 01:47:32 +07:00
Muhammad Faiz
9b4648a2cd avcodec/decode: do not treat discarded frames as eof when draining
Fix fate failures:
    make fate-mov THREADS=32

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-05-03 01:31:48 +07:00
Thomas Mundt
2da5bf4c2f avfilter/interlace: add complex vertical low-pass filter
This complex (-1 2 6 2 -1) filter slightly less reduces interlace 'twitter' but better retain detail and subjective sharpness impression compared to the linear (1 2 1) filter.

Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-05-02 14:09:50 -03:00
Carl Eugen Hoyos
20da413502 lavf/nutdec: Fix an impossible condition, regression since e0c53c34.
Fixes ticket #6362.
2017-05-02 08:43:12 +02:00
James Almer
0a6ca7aa0a avcodec/internal: update FF_CODEC_CAP_SETS_PKT_DTS doxy
The code it refers to was moved to decode.c in 00fb745a10
2017-05-01 20:38:34 -03:00
Michael Niedermayer
56ddb923c6 tools/target_dec_fuzzer: Use avcodec_register_all() instead of register_all()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-02 00:55:19 +02:00
Carl Eugen Hoyos
f4c133c708 lavc/mips/iirfilter_mips: Include config.h.
Fixes the following warning:
libavcodec/mips/iirfilter_mips.c:57:5: warning: "HAVE_INLINE_ASM" is not defined
2017-05-01 23:46:28 +02:00
Carl Eugen Hoyos
a88b0b0ba7 lavc/mips/hevc_idct_msa: Add missing const qualifier.
Fixes many warnings:
initialization discards 'const' qualifier from pointer target type
2017-05-01 23:44:21 +02:00
Michael Niedermayer
b29feec982 avcodec/indeo2: Check remaining bits in ir2_decode_plane()
Fixes: 1290/clusterfuzz-testcase-minimized-5815578902134784
Fixes: timeout

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-01 18:54:41 +02:00
Michael Niedermayer
2f00300b77 avcodec/vp3: Check remaining bits in unpack_dct_coeffs()
Decreases the time spend decoding junk.

May fix: 1283/clusterfuzz-testcase-minimized-6221126759874560

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-01 18:48:39 +02:00
Michael Niedermayer
b706ddbae3 doc/developer: Add terse documentation of assumed C implementation defined behavior
Suggested-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-01 17:59:10 +02:00
Michael Niedermayer
63b8d4146d avcodec/bmp: Use ff_set_dimensions()
Fixes out of memory

Fixes: 1282/clusterfuzz-testcase-minimized-5400131681648640

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-01 17:55:22 +02:00
Micah Galizia
28b2467074 libavformat/http: Ignore expired cookies
Signed-off-by: Micah Galizia <micahgalizia@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-01 17:55:22 +02:00
Martin Vignali
89812e423d fate/exr : add test for negative float value
the tested sample contain negative value in the red channel
need to be clip to zero, and not set to MAX_RED

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-01 11:40:57 +02:00
Martin Vignali
5ad18f279a fate/exr : add tests for piz uncompress
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-01 11:40:57 +02:00
Martin Vignali
37f4d22075 libavcodec/exr : fix piz uncompress on big endian
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-01 11:40:57 +02:00
James Almer
cac8de2da5 avcodec/options: do a more thorough clean up in avcodec_copy_context()
Free coded_frame, coded_side_data and unref hw_device_ctx to prevent
potential leaks.

Reviewed-by: Aaron Levinson <alevinsn@aracnet.com>
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-04-30 23:18:05 -03:00
James Almer
54a4c9b4e9 avcodec/options: factorize avcodec_copy_context() cleanup code
Reviewed-by: Aaron Levinson <alevinsn@aracnet.com>
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-04-30 23:18:04 -03:00
James Almer
37cc1c1e91 avformat/matroskaenc: add support for writing Content Light Level elements
Signed-off-by: James Almer <jamrial@gmail.com>
2017-04-30 20:04:57 -03:00
James Almer
095147ae06 avformat/matroskadec: export Content Light Level metadata
Based on a patch by Hendrik Leppkes

Signed-off-by: James Almer <jamrial@gmail.com>
2017-04-30 20:04:50 -03:00
James Almer
d61f93bf04 Merge commit 'c2fa6bb0e8703a7a6aa10e11f9ab36094416d83f'
* commit 'c2fa6bb0e8703a7a6aa10e11f9ab36094416d83f':
  mpeg12dec: move setting first_field to mpeg_field_start()

This commit is a noop, see 2f6f2f4f73

Merged-by: James Almer <jamrial@gmail.com>
2017-04-30 10:23:50 -03:00
Michael Niedermayer
a9b5b6a97f tools: Eliminate codec_type complexity from fuzzer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-30 14:24:51 +02:00
Michael Niedermayer
7796f29065 libswscale/tests/swscale: Fix uninitialized variables
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-30 14:23:27 +02:00
Paul B Mahol
8dd3a53dbf avfilter/af_crystalizer: add support for more sample formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-04-30 13:00:01 +02:00
Muhammad Faiz
d535e0c140 avcodec/pthread_frame, decode: allow errors to happen on draining
So, all frames and errors are correctly reported in order.
Also limit the numbers of error during draining to prevent infinite loop.

This fix fate failure with THREADS>=4:
  make fate-h264-attachment-631 THREADS=4
This also reverts a755b725ec.

Suggested-by: wm4, Ronald S. Bultje, Marton Balint
Reviewed-by: w4 <nfxjfg@googlemail.com>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-04-30 05:48:21 +07:00
Paul B Mahol
399c7ab9c6 avfilter: add video oscilloscope filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-04-29 19:12:34 +02:00
Paul B Mahol
8341d0dd0e avfilter: add pixscope filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-04-29 18:47:41 +02:00