ffmpeg.git
3 years agolavfi/atempo: Avoid false triggering an assertion failure
Pavel Koshevoy [Mon, 4 Sep 2017 02:44:31 +0000 (20:44 -0600)]
lavfi/atempo: Avoid false triggering an assertion failure

Steps to reproduce:
1. revert 4240e5b047379b29c33dd3f4438bc4e610527b83
2. ./ffmpeg -f lavfi -i sine=d=1 -af aselect=e=0,atempo=0.5 -y atempo.wav

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoRevert "lavfi/atempo: avoid false triggering an assertion failure"
Pavel Koshevoy [Sun, 3 Sep 2017 13:34:08 +0000 (15:34 +0200)]
Revert "lavfi/atempo: avoid false triggering an assertion failure"

This reverts commit 4240e5b047379b29c33dd3f4438bc4e610527b83.

Fixes ticket #6540.

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoavcodec/audiotoolboxdec: use av_freep()
James Almer [Wed, 6 Sep 2017 16:03:29 +0000 (13:03 -0300)]
avcodec/audiotoolboxdec: use av_freep()

This prevents leaving dangling pointers.

3 years agoavcodec/audiotoolboxdec: switch to the new generic filtering mechanism
James Almer [Thu, 25 May 2017 15:56:50 +0000 (12:56 -0300)]
avcodec/audiotoolboxdec: switch to the new generic filtering mechanism

Tested-by: ubitux
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/audiotoolboxdec: add FF_CODEC_CAP_INIT_CLEANUP to the decoder capabilities
James Almer [Thu, 25 May 2017 14:07:42 +0000 (11:07 -0300)]
avcodec/audiotoolboxdec: add FF_CODEC_CAP_INIT_CLEANUP to the decoder capabilities

Extradata may be allocated and the AudioConverterRef may be created during init(),
which in case of a failure would not be freed as close() isn't called afterwards.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/audiotoolboxdec: always use a copy of the AVCodecContext extradata
James Almer [Thu, 25 May 2017 14:00:47 +0000 (11:00 -0300)]
avcodec/audiotoolboxdec: always use a copy of the AVCodecContext extradata

Fixes memleaks introduced by 954e2b3d34b7c2d82871254f07e2f8a39bc451cb

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/af_dcshift: add direct path
Paul B Mahol [Wed, 6 Sep 2017 09:46:24 +0000 (11:46 +0200)]
avfilter/af_dcshift: add direct path

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/vf_overlay: Restore shorthand option order
Michael Niedermayer [Tue, 5 Sep 2017 13:26:52 +0000 (15:26 +0200)]
avfilter/vf_overlay: Restore shorthand option order

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolibavcodec/mips: Improve avc idct8 msa function
Kaustubh Raste [Mon, 31 Jul 2017 06:37:03 +0000 (12:07 +0530)]
libavcodec/mips: Improve avc idct8 msa function

Replace memset call with msa stores.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/lavfutils: remove usage of AVStream->codec
James Almer [Wed, 30 Aug 2017 05:07:00 +0000 (02:07 -0300)]
avfilter/lavfutils: remove usage of AVStream->codec

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavformat/hlsenc: Added configuration to override HTTP User-Agent
Karthick J [Tue, 5 Sep 2017 15:30:52 +0000 (23:30 +0800)]
avformat/hlsenc: Added configuration to override HTTP User-Agent

Signed-off-by: Karthick J <kjeyapal@akamai.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
3 years agobuild: consistent spacing between lists (cosmetics)
Clément Bœsch [Tue, 5 Sep 2017 10:45:20 +0000 (12:45 +0200)]
build: consistent spacing between lists (cosmetics)

3 years agoavfilter/avf_avectorscope: fix mistake in previous commit
Paul B Mahol [Tue, 5 Sep 2017 09:55:23 +0000 (11:55 +0200)]
avfilter/avf_avectorscope: fix mistake in previous commit

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/avf_avectorscope: add possibility to auto zoom
Paul B Mahol [Tue, 5 Sep 2017 09:43:49 +0000 (11:43 +0200)]
avfilter/avf_avectorscope: add possibility to auto zoom

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter: add despill filter
Paul B Mahol [Mon, 28 Aug 2017 12:32:25 +0000 (14:32 +0200)]
avfilter: add despill filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavcodec: add AV_HWACCEL_CODEC_CAP_EXPERIMENTAL flag
James Almer [Fri, 1 Sep 2017 17:56:05 +0000 (14:56 -0300)]
avcodec: add AV_HWACCEL_CODEC_CAP_EXPERIMENTAL flag

This flag replaces the deprecated, non-prefixed HWACCEL_CODEC_CAP_EXPERIMENTAL
one.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/vf_fftfilt: make it possible to evaluate expressions per frame
Paul B Mahol [Mon, 4 Sep 2017 17:29:37 +0000 (19:29 +0200)]
avfilter/vf_fftfilt: make it possible to evaluate expressions per frame

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/vf_fftfilt: add generic timeline support
Paul B Mahol [Mon, 4 Sep 2017 17:04:31 +0000 (19:04 +0200)]
avfilter/vf_fftfilt: add generic timeline support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/vf_fftfilt: add support for more pixel formats
Paul B Mahol [Mon, 4 Sep 2017 16:36:37 +0000 (18:36 +0200)]
avfilter/vf_fftfilt: add support for more pixel formats

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/vf_fftfilt: cache rdft contexts
Paul B Mahol [Mon, 4 Sep 2017 16:24:00 +0000 (18:24 +0200)]
avfilter/vf_fftfilt: cache rdft contexts

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agolavd: drop QTKit indev
Clément Bœsch [Mon, 4 Sep 2017 13:45:11 +0000 (15:45 +0200)]
lavd: drop QTKit indev

QTKit has been deprecated in favor of AVFoundation for years, and we
have an avfoundation input device.

See https://developer.apple.com/documentation/qtkit

3 years agoavfilter/vf_datascope: make it possible for output window to automatically change...
Paul B Mahol [Mon, 4 Sep 2017 12:20:29 +0000 (14:20 +0200)]
avfilter/vf_datascope: make it possible for output window to automatically change position

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavformat/flvdec: Set need_context_update when setting the initial extradata
Alex Converse [Tue, 29 Aug 2017 17:47:26 +0000 (10:47 -0700)]
avformat/flvdec: Set need_context_update when setting the initial extradata

Fixes ticket 6398.

Debugged with the help of James Almer and Hendrik Leppkes.

3 years agoavfilter/vf_datascope: add timeline support to pixscope and oscilloscope
Paul B Mahol [Sun, 3 Sep 2017 18:42:04 +0000 (20:42 +0200)]
avfilter/vf_datascope: add timeline support to pixscope and oscilloscope

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agodoc/filters: add missing '' for blend example
Paul B Mahol [Sun, 3 Sep 2017 18:00:53 +0000 (20:00 +0200)]
doc/filters: add missing '' for blend example

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agodoc/filters: add one more blend example
Paul B Mahol [Sun, 3 Sep 2017 18:00:08 +0000 (20:00 +0200)]
doc/filters: add one more blend example

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/vf_displace: add mirror edge mode
Paul B Mahol [Sun, 3 Sep 2017 12:15:33 +0000 (14:15 +0200)]
avfilter/vf_displace: add mirror edge mode

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/vf_displace: remove useless requirement that SAR matches between input streams
Paul B Mahol [Sun, 3 Sep 2017 11:37:43 +0000 (13:37 +0200)]
avfilter/vf_displace: remove useless requirement that SAR matches between input streams

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/vf_subtitles: enable processing of alpha channel
Paul B Mahol [Wed, 30 Aug 2017 19:04:02 +0000 (21:04 +0200)]
avfilter/vf_subtitles: enable processing of alpha channel

Fixes #6605.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agodoc/filters.texi: Add default values to vf_vaguedenoiser options
Leo Izen [Sun, 3 Sep 2017 09:01:13 +0000 (05:01 -0400)]
doc/filters.texi: Add default values to vf_vaguedenoiser options

3 years agolavd: drop disabled v4l code
Clément Bœsch [Sat, 2 Sep 2017 22:18:57 +0000 (00:18 +0200)]
lavd: drop disabled v4l code

This code is disabled since 2012. V4L1 was dropped from the kernel more
than 10 years ago.

3 years agoavcodec/dirac_vlc: Fix invalid shift in ff_dirac_golomb_read_32bit()
Michael Niedermayer [Fri, 1 Sep 2017 17:56:12 +0000 (19:56 +0200)]
avcodec/dirac_vlc: Fix invalid shift in ff_dirac_golomb_read_32bit()

Fixes: runtime error: shift exponent 64 is too large for 64-bit type 'residual' (aka 'unsigned long')
Fixes: 2838/clusterfuzz-testcase-minimized-6260066086813696

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/dirac_dwt: Fix multiple overflows in 9/7 lifting
Michael Niedermayer [Fri, 1 Sep 2017 17:56:11 +0000 (19:56 +0200)]
avcodec/dirac_dwt: Fix multiple overflows in 9/7 lifting

Fixes: runtime error: signed integer overflow: 1073901567 + 1073901567 cannot be represented in type 'int'
Fixes: 3124/clusterfuzz-testcase-minimized-454643435752652

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/diracdec: Fix integer overflow in INTRA_DC_PRED()
Michael Niedermayer [Fri, 1 Sep 2017 17:56:10 +0000 (19:56 +0200)]
avcodec/diracdec: Fix integer overflow in INTRA_DC_PRED()

Fixes: runtime error: signed integer overflow: 1168175789 + 1168178473 cannot be represented in type 'int'
Fixes: 3081/clusterfuzz-testcase-minimized-4807564879462400
Fixes: 2844/clusterfuzz-testcase-minimized-5561715838156800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agobuild: drop unused sndio_h and asoundlib_h
Clément Bœsch [Wed, 30 Aug 2017 11:56:27 +0000 (13:56 +0200)]
build: drop unused sndio_h and asoundlib_h

3 years agobuild: make sndio part of the autodetected libraries
Clément Bœsch [Wed, 30 Aug 2017 11:41:23 +0000 (13:41 +0200)]
build: make sndio part of the autodetected libraries

sndio is already autodetected, this commit makes sure
--disable-autodetect actually disable it unless --enable-sndio is
specified.

3 years agobuild: make jack part of the autodetected libraries
Clément Bœsch [Wed, 30 Aug 2017 11:34:50 +0000 (13:34 +0200)]
build: make jack part of the autodetected libraries

jack is already autodetected, this commit makes sure
--disable-autodetect actually disable it unless --enable-jack is
specified.

3 years agobuild: make alsa part of the autodetected libraries
Clément Bœsch [Wed, 30 Aug 2017 11:28:49 +0000 (13:28 +0200)]
build: make alsa part of the autodetected libraries

alsa libs are already autodetected, this commit makes sure
--disable-autodetect actually disable it unless --enable-alsa is
specified.

3 years agobuild: make sure a disabled autodetect still pick the libc's iconv
Clément Bœsch [Wed, 30 Aug 2017 10:26:01 +0000 (12:26 +0200)]
build: make sure a disabled autodetect still pick the libc's iconv

3 years agobuild: add --disable-autodetect switch
Clément Bœsch [Fri, 28 Jul 2017 11:44:07 +0000 (13:44 +0200)]
build: add --disable-autodetect switch

3 years agobuild: simplify weak-enabling of autodetected libraries
Clément Bœsch [Fri, 28 Jul 2017 11:39:00 +0000 (13:39 +0200)]
build: simplify weak-enabling of autodetected libraries

3 years agobuild: remove vda_framework from enable_weak
Clément Bœsch [Fri, 28 Jul 2017 11:31:35 +0000 (13:31 +0200)]
build: remove vda_framework from enable_weak

vda_framework is already pulled by the weakly enabled vda and
videotoolbox.

3 years agobuild: replace use of HAVE_SDL2 with existing CONFIG_SDL2
Clément Bœsch [Wed, 30 Aug 2017 11:46:38 +0000 (13:46 +0200)]
build: replace use of HAVE_SDL2 with existing CONFIG_SDL2

There is no need for duplication.

3 years agobuild: treat sdl2 like other autodetected libraries
Clément Bœsch [Wed, 30 Aug 2017 11:13:08 +0000 (13:13 +0200)]
build: treat sdl2 like other autodetected libraries

3 years agobuild: isolate sdl-to-sdl2 aliasing
Clément Bœsch [Wed, 30 Aug 2017 11:12:14 +0000 (13:12 +0200)]
build: isolate sdl-to-sdl2 aliasing

This simplifies incoming SDL related changes by removing potential
mismatching states of sdl and sdl2 variables. Since a component can have
all kind of states (such as unset, enabled, disabled or requested),
keeping these variables in sync manually in random places is not robust.

3 years agobuild: treat securetransport and schannel like other autodetected libraries
Clément Bœsch [Fri, 28 Jul 2017 11:22:40 +0000 (13:22 +0200)]
build: treat securetransport and schannel like other autodetected libraries

3 years agobuild: treat libxcb like other autodetected libraries
Clément Bœsch [Fri, 28 Jul 2017 11:16:42 +0000 (13:16 +0200)]
build: treat libxcb like other autodetected libraries

3 years agobuild: treat iconv like other autodetected libraries
Clément Bœsch [Fri, 28 Jul 2017 10:58:39 +0000 (12:58 +0200)]
build: treat iconv like other autodetected libraries

3 years agobuild: treat crystalhd like other hwaccels
Clément Bœsch [Fri, 28 Jul 2017 10:55:43 +0000 (12:55 +0200)]
build: treat crystalhd like other hwaccels

3 years agobuild: group z libs with other autodetected libraries
Clément Bœsch [Fri, 28 Jul 2017 10:18:59 +0000 (12:18 +0200)]
build: group z libs with other autodetected libraries

3 years agoavcodec/nvenc: always output picture timing SEI
Timo Rothenpieler [Sat, 2 Sep 2017 13:39:24 +0000 (15:39 +0200)]
avcodec/nvenc: always output picture timing SEI

Interlaced encoding profits from it, or might even need it in some
players.
No harm in enabling it unconditionally.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
3 years agoavcodec/internal: move FF_QSCALE_TYPE defines from avcodec.h
James Almer [Fri, 1 Sep 2017 17:44:27 +0000 (14:44 -0300)]
avcodec/internal: move FF_QSCALE_TYPE defines from avcodec.h

Their use in the public header is deprecated and will be removed, but
they are still needed by some codecs at least as long as qscale related
deprecated fields in the AVFrame struct remain in the tree.

3 years agoavfilter: remove duplicate and disabled trace log function
James Almer [Wed, 30 Aug 2017 04:41:43 +0000 (01:41 -0300)]
avfilter: remove duplicate and disabled trace log function

It's already defined and actually enabled depending on compiler options
elsewhere.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agolavf: make avio_read_partial() public
wm4 [Thu, 17 Aug 2017 13:01:44 +0000 (15:01 +0200)]
lavf: make avio_read_partial() public

Main use-case is proxying avio through a foreign I/O layer and a custom
AVIO context, without losing latency and performance characteristics.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Merged from Libav commit 173b56218f39c64.

3 years agoavformat/avio: update avio_alloc_context() doxy
James Almer [Fri, 1 Sep 2017 15:26:28 +0000 (12:26 -0300)]
avformat/avio: update avio_alloc_context() doxy

It must be freed using avio_context_free() starting with commit
b12e4d3bb8df994f042ff1216fb8de2b967aab9e.

Found-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavformat/dash:add copyright to dash.c
Steven Liu [Fri, 1 Sep 2017 10:52:56 +0000 (18:52 +0800)]
avformat/dash:add copyright to dash.c

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
3 years agoavcodec/nvenc: only push cuda context on encoder close if encoder exists
Timo Rothenpieler [Wed, 30 Aug 2017 19:12:23 +0000 (21:12 +0200)]
avcodec/nvenc: only push cuda context on encoder close if encoder exists

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
3 years agoavcodec/nvenc: add support for specifying entropy coding mode
Timo Rothenpieler [Wed, 30 Aug 2017 19:06:25 +0000 (21:06 +0200)]
avcodec/nvenc: add support for specifying entropy coding mode

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
3 years agoUse the new AVIOContext destructor.
Anton Khirnov [Fri, 1 Sep 2017 05:16:33 +0000 (02:16 -0300)]
Use the new AVIOContext destructor.

(cherry picked from commit 6f554521afdf7ab4edbfaa9536660a1dca946b19)
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavio: add a destructor for AVIOContext
Anton Khirnov [Sun, 27 Aug 2017 16:26:58 +0000 (13:26 -0300)]
avio: add a destructor for AVIOContext

Before this commit, AVIOContext is to be freed with a plain av_free(),
which prevents us from adding any deeper structure to it.

(cherry picked from commit 99684f3ae752fc8bfb44a2dd1482f8d7a3d8536d)
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavformat/dash: move reused API to common file and header file
Steven Liu [Fri, 1 Sep 2017 02:20:56 +0000 (10:20 +0800)]
avformat/dash: move reused API to common file and header file

move from dashenc, move DASHTmplId and dash_fill_tmpl_params to
dash.c, they will be used by dash demuxer and dash muxer.

v2 fixed:
1. rename common file from dashcomm.* to dash.*
Suggested-by: Hendrik Leppkes <h.leppkes@gmail.com>
v3 fixed:
1. rename header file pre defined
2. add ff_ prefix for the internal API
Suggested-by: James Almer <jamrial@gmail.com>
Suggested-by: Timo Rothenpieler <timo@rothenpieler.org>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
3 years agoavformat/mxfdec: Fix Sign error in mxf_read_primer_pack()
孙浩(晓黑) [Tue, 29 Aug 2017 21:59:21 +0000 (23:59 +0200)]
avformat/mxfdec: Fix Sign error in mxf_read_primer_pack()

Fixes: 20170829B.mxf

Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array()
孙浩(晓黑) [Tue, 29 Aug 2017 21:59:21 +0000 (23:59 +0200)]
avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array()

Fixes: 20170829A.mxf

Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/nsvdec: Fix DoS due to lack of eof check in nsvs_file_offset loop.
孙浩(晓黑) [Tue, 29 Aug 2017 21:59:21 +0000 (23:59 +0200)]
avformat/nsvdec: Fix DoS due to lack of eof check in nsvs_file_offset loop.

Fixes: 20170829.nsv

Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavocdec/libopus: fix typo
pkviet [Thu, 31 Aug 2017 22:44:11 +0000 (00:44 +0200)]
avocdec/libopus: fix typo

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mov: prevent duplication of first fragment's ctts_data
Daniel Glöckner [Sun, 6 Aug 2017 01:04:53 +0000 (03:04 +0200)]
avformat/mov: prevent duplication of first fragment's ctts_data

MP4 files with fragments might have the first moof box that is mentioned
in a fragment index before the first mdat box. Since it is then already
parsed by mov_read_header, we have to make sure that mov_switch_root
will not parse it again when seeking by setting the headers_read flag in
the index. Parsing it a second time would cause the ctts_data array to
receive a second copy of the information from the trun box, leading to
wrong PTS values for the second and following fragments in presence of
B-frames.

Fixes ticket 6560.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mov: Bail when invalid sample data is present.
Dale Curtis [Mon, 31 Jul 2017 20:44:22 +0000 (13:44 -0700)]
avformat/mov: Bail when invalid sample data is present.

ctts data in ffmpeg relies on the index entries array to be 1:1
with samples... yet sc->sample_count can be read directly from
the 'stsz' box and index entries are only generated if a chunk
count has been read from 'stco' box.

Ensure that if sc->sample_count > 0, sc->chunk_count is too as
a basic sanity check. Additionally we need to check that after
the index is built we have the right number of entries, so we
also check in mov_read_trun() that sc->sample_count ==
st->nb_index_entries.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/concatdec: add fallback for calculating file duration
Justin Ruggles [Tue, 29 Aug 2017 02:45:20 +0000 (22:45 -0400)]
avformat/concatdec: add fallback for calculating file duration

If a file does not have a known duration, this leads to the timestamps
starting over for the next file, causing non-monotonic timestamps.
To prevent this, track the duration during demuxing and use it to
determine the current file duration before opening the next file.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
3 years agoavcodec/fits: add missing header includes
James Almer [Thu, 31 Aug 2017 14:26:36 +0000 (11:26 -0300)]
avcodec/fits: add missing header includes

Fixes checkheaders.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agofate: add tests for some video source filters
Tobias Rapp [Thu, 17 Aug 2017 12:40:40 +0000 (14:40 +0200)]
fate: add tests for some video source filters

Adds FATE tests for the previously untested allrgb, allyuv, rgbtestsrc,
smptebars, smptehdbars and yuvtestsrc filters.

Also adds a test for testsrc2 filter with rgb+alpha.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
3 years agofate/flvenc: set bitexact output format flag explicitly
James Almer [Thu, 31 Aug 2017 02:21:41 +0000 (23:21 -0300)]
fate/flvenc: set bitexact output format flag explicitly

Using the encoder flags to set the muxer in bitexact mode is deprecated.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoffmpeg_opt: add proper deprecation guards to lowres code
James Almer [Thu, 31 Aug 2017 01:31:35 +0000 (22:31 -0300)]
ffmpeg_opt: add proper deprecation guards to lowres code

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agofate/pixlet : add test for rgb
Martin Vignali [Sun, 2 Apr 2017 21:25:33 +0000 (23:25 +0200)]
fate/pixlet : add test for rgb

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/vf_mcdeint: remove usage of deprecated AVCodecContext.me_method
James Almer [Mon, 28 Aug 2017 16:40:06 +0000 (13:40 -0300)]
avfilter/vf_mcdeint: remove usage of deprecated AVCodecContext.me_method

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/af_adelay: remove requirement that at least one delay should be provided
Paul B Mahol [Wed, 30 Aug 2017 16:14:10 +0000 (18:14 +0200)]
avfilter/af_adelay: remove requirement that at least one delay should be provided

Such requirement is not necessary and code works without it just fine.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agopostproc: remove usage of deprecated QP_STORE_T define
James Almer [Wed, 30 Aug 2017 17:43:22 +0000 (14:43 -0300)]
postproc: remove usage of deprecated QP_STORE_T define

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/vf_mcdeint: free the AVCodecContext struct properly
James Almer [Wed, 30 Aug 2017 17:34:04 +0000 (14:34 -0300)]
avfilter/vf_mcdeint: free the AVCodecContext struct properly

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agofate: stop using deprecated filter syntax in hls tests
James Almer [Wed, 30 Aug 2017 17:14:54 +0000 (14:14 -0300)]
fate: stop using deprecated filter syntax in hls tests

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agofate: remove usage of deprecated AVCodecContext.me_method in vsynth snow tests
James Almer [Wed, 30 Aug 2017 17:06:49 +0000 (14:06 -0300)]
fate: remove usage of deprecated AVCodecContext.me_method in vsynth snow tests

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoconfigure: require pkg-config for libvmaf
Ashish Singh [Tue, 1 Aug 2017 15:14:18 +0000 (20:44 +0530)]
configure: require pkg-config for libvmaf

This patch makes the libvmaf filter use pkg-config to detect
and link to libvmaf.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
3 years agoavfilter/vf_libvmaf: fix pre convert to framesync2 bugs
Ashish Singh [Thu, 3 Aug 2017 05:34:01 +0000 (11:04 +0530)]
avfilter/vf_libvmaf: fix pre convert to framesync2 bugs

Hi, it fixes the errors while converting to framesync2.
libvmaf was changed recently, double *score variable is removed in the new
version since it's not used anywhere. This patch fixes all the warnings and
segmentation faults.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
3 years agoavcodec/codec_desc: make FITS description longer
Paul B Mahol [Wed, 30 Aug 2017 10:18:22 +0000 (12:18 +0200)]
avcodec/codec_desc: make FITS description longer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/vf_lut2: add framesync options
Paul B Mahol [Wed, 30 Aug 2017 10:06:47 +0000 (12:06 +0200)]
avfilter/vf_lut2: add framesync options

Also stop leaking memory.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoFATE: Add FITS tests
Paras Chadha [Tue, 29 Aug 2017 17:36:42 +0000 (23:06 +0530)]
FATE: Add FITS tests

Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
3 years agoAdd FITS Muxer
Paras Chadha [Tue, 29 Aug 2017 17:20:33 +0000 (22:50 +0530)]
Add FITS Muxer

Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
3 years agoAdd FITS Encoder
Paras Chadha [Tue, 29 Aug 2017 17:19:30 +0000 (22:49 +0530)]
Add FITS Encoder

Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
3 years agoAdd FITS Demuxer
Paras Chadha [Tue, 29 Aug 2017 17:12:26 +0000 (22:42 +0530)]
Add FITS Demuxer

Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
3 years agoAdd FITS Decoder
Paras Chadha [Tue, 29 Aug 2017 17:16:44 +0000 (22:46 +0530)]
Add FITS Decoder

Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
3 years agocompat/cuda/ptx2c: strip CR from each line
Ricardo Constantino [Tue, 29 Aug 2017 00:46:13 +0000 (01:46 +0100)]
compat/cuda/ptx2c: strip CR from each line

Windows nvcc + cl.exe produce a .ctx file with CR+LF newlines which
need to be stripped to work with gcc.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
3 years agoconfigure: add support for libnpp* from cuda sdk 9
Timo Rothenpieler [Tue, 29 Aug 2017 11:30:29 +0000 (13:30 +0200)]
configure: add support for libnpp* from cuda sdk 9

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
3 years agoavformat/mxfenc: Replace literal numbers by named enum values.
Michael Niedermayer [Tue, 29 Aug 2017 00:13:21 +0000 (02:13 +0200)]
avformat/mxfenc: Replace literal numbers by named enum values.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/snowdec: Fix integer overflow in decode_subband_slice_buffered()
Michael Niedermayer [Sun, 27 Aug 2017 22:30:33 +0000 (00:30 +0200)]
avcodec/snowdec: Fix integer overflow in decode_subband_slice_buffered()

Fixes: runtime error: signed integer overflow: 267 * 8388608 cannot be represented in type 'int'
Fixes: 2743/clusterfuzz-testcase-minimized-5820652076400640

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/hevc_ps: Fix undefined shift in pcm code
Michael Niedermayer [Sun, 27 Aug 2017 21:59:09 +0000 (23:59 +0200)]
avcodec/hevc_ps: Fix undefined shift in pcm code

Fixes: runtime error: shift exponent -1 is negative
Fixes: 3091/clusterfuzz-testcase-minimized-6229767969832960

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/h264idct_template: Fix integer overflow in ff_h264_idct8_add()
Michael Niedermayer [Wed, 16 Aug 2017 23:06:14 +0000 (01:06 +0200)]
avcodec/h264idct_template: Fix integer overflow in ff_h264_idct8_add()

Fixes: 2891/clusterfuzz-testcase-minimized-5881795457318912
Fixes: runtime error: signed integer overflow: 1551827968 - -775913984 cannot be represented in type 'int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mxfenc: Check that the video codec in D-10 is MPEG-2
Michael Niedermayer [Tue, 29 Aug 2017 00:13:20 +0000 (02:13 +0200)]
avformat/mxfenc: Check that the video codec in D-10 is MPEG-2

Others do not work, but nothing rejects them prior to this patch if the
parameters otherwise match

Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolavfi: bump minor version after change in options.
Nicolas George [Tue, 29 Aug 2017 13:46:36 +0000 (15:46 +0200)]
lavfi: bump minor version after change in options.

3 years agodoc/filters: document framesync options.
Nicolas George [Thu, 10 Aug 2017 11:32:19 +0000 (13:32 +0200)]
doc/filters: document framesync options.

3 years agolavfi: remove dualinput.
Nicolas George [Mon, 31 Jul 2017 11:38:22 +0000 (13:38 +0200)]
lavfi: remove dualinput.

3 years agovf_ssim: convert to framesync2.
Nicolas George [Mon, 31 Jul 2017 11:37:06 +0000 (13:37 +0200)]
vf_ssim: convert to framesync2.

3 years agolavfi/vf_psnr: convert to framesync2.
Nicolas George [Mon, 31 Jul 2017 10:44:13 +0000 (12:44 +0200)]
lavfi/vf_psnr: convert to framesync2.