Commit Graph

89856 Commits

Author SHA1 Message Date
Michael Niedermayer b2be76c0a4 avcodec/dnxhddec: Check dc vlc
Fixes: signed integer overflow: 1024 + 2147483640 cannot be represented in type 'int'
Fixes: 4671/clusterfuzz-testcase-minimized-6027464343027712

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>
2018-01-05 03:35:48 +01:00
Marc-Antoine Arnaud e425047a47 avfilter: rename variables in geq
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-05 03:35:48 +01:00
Marc-Antoine Arnaud ac6b0bba79 avfilter: slice processing for geq
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-05 03:35:48 +01:00
Marc-Antoine Arnaud 206b25f9f4 avfilter: reorder variable definition in geq
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-05 03:35:48 +01:00
James Almer d36335bda5 avcodec/parser: use a mutex instead of atomics in av_register_codec_parser()
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-04 21:56:49 -03:00
Marton Balint f528c49c7c avfilter/vf_framerate: calculate interpolation as integer
It was truncated to int later on anyway. Fate test changes are due to rounding
instead of truncation.

Fixes fate test failures on x86-32 (gcc 4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1))
after 090b740680.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-04 22:37:43 +01:00
Misty De Meo fde057dfb2 aiff: add support for XA ADPCM
Certain AIFF files encode XA ADPCM compressed audio using a chunk
with the tag `APCM`. Aside from this custom chunk type, they're
otherwise standard AIFF files. I've only observed these files in the
Sega Saturn game Sonic Jam so far.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-04 21:39:34 +01:00
James Almer 8d9c9775b2 avutil/log: use thread wrappers for the locking functionality
w32threads and os2threads both support static mutex initialization now,
so don't limit it to pthreads only.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-04 15:22:19 -03:00
James Almer 414a49d671 ffmpeg: use thread wrappers for the thread message functionality
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-04 15:22:09 -03:00
James Almer b4eeffffc8 configure: update minimum required version of libvmaf
At least version 0.6.2 is needed since commit
df3222d4bb.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-04 14:33:03 -03:00
Michael Wootton 34c113335b Add support for H.264 and HEVC hardware encoding for AMD GPUs based on AMF SDK
Requires AMF headers for at least version 1.4.4.1.

Signed-off-by: Mikhail Mironov <mikhail.mironov@amd.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-01-04 18:15:56 +01:00
wm4 2477bfe221 http: avoid logging reconnect warning if stream was aborted
If the stream was aborted using the libavformat interrupt callback, we
don't want it to log the reconnect warning. (Exiting after logging this
warning worked well, so this is only for avoiding the ugly warning.)
2018-01-04 18:08:31 +01:00
wm4 18fbfd7bf8 hwcontext_dxva2: initialize D3DDISPLAYMODEEX correctly 2018-01-04 15:52:46 +01:00
Humberto Ribeiro 59b126f922 libavutil/hwcontext_dxva2: Add check for possible errors from GetAdapterDisplayModeEx
This prevents a possible crash in CreateDeviceEx when using faulty
response from GetAdapterDisplayModeEx and allows ffmpeg to fallback to
classic d3d9.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2018-01-04 15:41:40 +01:00
wm4 1b283c4a0d http: bump message level for reconnect message and log timeout 2018-01-04 15:07:55 +01:00
wm4 8a108bdea0 http: block while waiting for reconnecting
It makes no sense to return an error after the first reconnect, and then
somehow resume the next time it's called. Usually this will lead to
demuxer errors. Make reconnecting block instead, until it has either
successfully reconnected, or given up.

Also make the wait reasonably interruptible. Since there is no mechanism
for this in the API, polling is the best we can do. This behaves roughly
the same as other interruptible network functions in libavformat.

(The original code would work if it returned AVERROR(EAGAIN) or so,
which would make retry_transfer_wrapper() repeat the read call. But I
think having an explicit loop for this is better anyway.)

I also snuck in a fix for reconnect_at_eof. It has to check for
AVERROR_EOF, not 0.
2018-01-04 15:07:55 +01:00
Paul B Mahol 89bbf5c7ec avfilter: add hilbert source FIR filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-04 12:26:19 +01:00
Carl Eugen Hoyos 695b1d8111 lavu/mem: Allow allocations close to max_alloc_size with av_fast_realloc(). 2018-01-04 05:39:18 +01:00
Rostislav Pehlivanov f141b353e6 opusenc_psy: disable stereo searches for mono streams
Fixes a crash which happened when someone tried to encode mono.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-04 02:52:40 +00:00
Rostislav Pehlivanov c29038f304 lavr: deprecate the entire library
Deprecate the entire library. Merged years ago to provide compatibility
with Libav, it remained unmaintained by the FFmpeg project and duplicated
functionality provided by libswresample.

In order to improve consistency and reduce attack surface, as well as to ease
burden on maintainers, it has been deprecated. Users of this library are asked
to migrate to libswresample, which, as well as providing more functionality,
is faster and has higher accuracy.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-04 01:38:22 +00:00
Paul B Mahol 88cbd25b19 avfilter: pass outlink to ff_get_audio_buffer()
This is more correct.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-03 22:52:47 +01:00
Jiejun Zhang 677701c6b3 lavc/audiotoolboxenc: fix noise in encoded audio
This fixes #6940

Although undocumented, AudioToolbox seems to require the data supplied
by the callback (i.e. ffat_encode_callback) being unchanged until the
next time the callback is called. In the old implementation, the
AVBuffer backing the frame is recycled after the frame is freed, and
somebody else (maybe the decoder) will write into the AVBuffer and
change the data. AudioToolbox then encodes some wrong data and noise
is produced. Retaining a frame reference solves this problem.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-03 17:32:55 -03:00
Nicolas George 29b5f3115d lavfi/framesync: remove an invalid free. 2018-01-03 19:54:39 +01:00
Nicolas George 9ace76697a lavfi/framesync: document frame ownership for dualinput. 2018-01-03 19:54:39 +01:00
Paul B Mahol 09b24a807a avfilter: add entropy filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-03 19:45:01 +01:00
Derek Buitenhuis 631fa0432b vf_paletteuse: Don't free the second frame from ff_framesync_dualinput_get_writable on error
This fixes a double free in he error case.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2018-01-03 13:02:27 -05:00
Derek Buitenhuis 6470abc740 vf_paletteuse: Add error checking to apply_palette
This fixes a segfault caused by passing NULL to ff_filter_frame
when an error occurs.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2018-01-03 13:02:15 -05:00
Derek Buitenhuis 500a9bb5ba lavc/options: Remove unneeded header
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2018-01-03 13:00:06 -05:00
Paul B Mahol 57d0c24132 avcodec/utvideoenc: switch to planar RGB formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-02 13:41:50 +01:00
Paul B Mahol 92b32664cd avcodec/utvideodec: add support for UMH2, UMY2, UMH4, UMY4, UMRA, UMRG
These are new modes which are supposed to be more SIMD friendly.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-02 13:41:49 +01:00
Vishwanath Dixit 41e51fbcd9 avformat/hlsenc: creation of variant streams in subdirectories
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-02 10:46:48 +08:00
Vishwanath Dixit e872befdb5 avformat/hlsenc: configurable variant stream index position in filenames 2018-01-02 10:46:17 +08:00
Vishwanath Dixit 26e1efb04f avformat/hlsenc: revamped master playlist url creation logic 2018-01-02 10:45:28 +08:00
Carl Eugen Hoyos 21b5990da4 lavu/mem: Do not realloc in av_fast_realloc() if size == min_size.
This can avoid OOM for min_size close to FFmpeg's arbitrary alloc limits.
2018-01-01 22:30:22 +01:00
Carl Eugen Hoyos 1112ba012d lavf/mov: Use av_fast_realloc() in mov_read_stts().
Avoids large allocations for short files with invalid stts entry.
Fixes bugzilla 1102.
2018-01-01 22:27:29 +01:00
Paul B Mahol 9f7dbaad7e avfilter/af_crystalizer: use outlink instead of inlink
Doesn't change anything but is more correct.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-01 21:57:06 +01:00
Rostislav Pehlivanov fdbd261967 lavc/Makefile: fix opus_parser dependencies
Fix suggested by RiCON.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-01 19:56:37 +00:00
Carl Eugen Hoyos bddf31ba75 configure: bump year
Happy new year!
2018-01-01 18:05:55 +01:00
Sean McGovern 7b0b5bc810 cmdutils: update copyright year to 2018 2018-01-01 02:51:51 -05:00
Steven Liu 2906363d1b avformat/hls: release mem resource to fix memleak
fix CID: 1426991

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-12-31 10:43:54 -08:00
Paul B Mahol f3552c3b9d avfilter/af_afir: rework FIR gain measurement
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-12-31 19:16:22 +01:00
wm4 0e1f771d22 tcp: properly return EOF
There is no POSIX error code for EOF - recv() signals EOF by simply
returning 0. But libavformat recently changed its conventions and
requires an explicit AVERROR_EOF, or it might get into an endless retry
loop, consuming 100% CPU while doing nothing.
2017-12-31 16:14:23 +01:00
Nicolas George e45f7bca73 lavf/concatdec: properly init streams timestamp parameters.
pts_wrap_bits defaults to 33 (like MPEG), that causes valid
timestamps to be unwrapped and become invalid.
Inspired by a patch by Wu Zhiqiang <mymoeyard@gmail.com>.
2017-12-31 10:33:24 +01:00
Aman Gupta 97b89432e4 avformat/hls: ignore http_persistent for segments requring crypto
Encrypted HLS segments have regular http:// urls, but open_input()
actually prefixes them with crypto+ before calling open_url(), so
they end up using the crypto protocol and not the http protocol.

This means invoking ff_http_do_new_request will fail, so we avoid
calling it in the first place. After the earlier http.c commit,
the failure results in a warning printed to the user. In earlier
versions, the failure would cause a segfault.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-30 21:07:55 -08:00
Michael Niedermayer 903be5e4f6 avcodec/exr: Check buf_size more completely
Fixes: Out of heap array read
Fixes: 4683/clusterfuzz-testcase-minimized-6152313673613312

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-30 21:02:49 +01:00
Aman Gupta c0b08ef94f avformat/http: return EINVAL if ff_http_do_new_request is called with non-http URLContext
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-30 09:58:03 -08:00
Rostislav Pehlivanov 51027d0b8b opus: merge encoder and decoder bitallocation functions into one
There's no difference apart from which entropy coding functions get called.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-12-30 17:05:23 +00:00
Zhong Li 1efbbfedca examples/qsvdec: do not set the deprecated field refcounted_frames
It is used by the deprecated API avcodec_decode_video2 and ignored by the
new decode APIs (avcodec_send_packet/avcodec_receive_frame).

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-12-29 16:13:02 +00:00
Zhong Li e23190269f lavu/qsv: add log message for libmfx version
It is benefit to diagnose issues related to different libmfx version.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-12-29 16:12:16 +00:00
Karthick Jeyapal 0c78b6a416 avformat/dashenc: Persistent HTTP connections supported as an option
Reviewed-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Steven Liu <lq@onvideo.cn>
2017-12-29 18:12:32 +08:00