]> git.sesse.net Git - ffmpeg/log
ffmpeg
4 years agoavformat/segafilmenc: Remove AVClass
Andreas Rheinhardt [Tue, 14 Jan 2020 03:13:33 +0000 (04:13 +0100)]
avformat/segafilmenc: Remove AVClass

This muxer does not have any private options and so does not need a
private class.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/ftp: slightly rework file retrieval with seeking
Marton Balint [Thu, 6 Feb 2020 22:32:10 +0000 (23:32 +0100)]
avformat/ftp: slightly rework file retrieval with seeking

- do not require a known file size for seek to work
- read the files till the actual end, do not limit data at the queried file
  size
- fix a bug which causes reading 0 byte files for non-existing files
- properly check the return status of the FTP server at the end of the file
  retrieval

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/ftp: do not break protocol on username or password with newlines
Marton Balint [Wed, 5 Feb 2020 23:48:17 +0000 (00:48 +0100)]
avformat/ftp: do not break protocol on username or password with newlines

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/ftp: add support for escaped credentials
Marton Balint [Wed, 5 Feb 2020 23:11:05 +0000 (00:11 +0100)]
avformat/ftp: add support for escaped credentials

Properly fixes ticket #7816.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/httpauth: do not decode plus sign to space in credentials
Marton Balint [Tue, 4 Feb 2020 22:46:23 +0000 (23:46 +0100)]
avformat/httpauth: do not decode plus sign to space in credentials

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/urldecode: add the ability to not decode plus sign to space
Marton Balint [Tue, 4 Feb 2020 22:44:28 +0000 (23:44 +0100)]
avformat/urldecode: add the ability to not decode plus sign to space

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/http: escape unsafe URL path in HTTP request
Marton Balint [Sat, 8 Feb 2020 00:44:30 +0000 (01:44 +0100)]
avformat/http: escape unsafe URL path in HTTP request

This avoids generating invalid HTTP requests if the path contains space or
other special characters.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/http: use AVBPrint to construct HTTP request
Marton Balint [Fri, 7 Feb 2020 23:08:54 +0000 (00:08 +0100)]
avformat/http: use AVBPrint to construct HTTP request

v2: Use s->buffer for creating request (as the old code did) instead of
the AVBPrint internal buffer. Some minor cosmetics.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/http: make sure URL path contains a slash
Marton Balint [Mon, 3 Feb 2020 22:29:08 +0000 (23:29 +0100)]
avformat/http: make sure URL path contains a slash

It is explicitly required by the HTTP RFC. Without this patch URLs like
http://example.com?query will not work.

Fixes ticket #8466.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/http: split the fragment part from the HTTP URL before the request
Marton Balint [Mon, 3 Feb 2020 22:06:09 +0000 (23:06 +0100)]
avformat/http: split the fragment part from the HTTP URL before the request

RFC 3986 states that the fragment identifier is separated from the rest of the
URI prior to a dereference, and thus the identifying information within the
fragment itself is dereferenced solely by the user agent.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/utils: make av_url_split search for hashmark as well to separate hostname
Marton Balint [Mon, 3 Feb 2020 00:32:00 +0000 (01:32 +0100)]
avformat/utils: make av_url_split search for hashmark as well to separate hostname

RFC 3986 states that the generic syntax uses the slash ("/"), question mark
("?"), and number sign ("#") characters to delimit components that are
significant to the generic parser's hierarchical interpretation of an
identifier.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/tests/url: add av_url_split tests
Marton Balint [Mon, 3 Feb 2020 00:13:28 +0000 (01:13 +0100)]
avformat/tests/url: add av_url_split tests

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/tests/url: make format more readable
Marton Balint [Sun, 2 Feb 2020 22:26:16 +0000 (23:26 +0100)]
avformat/tests/url: make format more readable

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/utils: Fix memleaks in avformat_open_input()
Andreas Rheinhardt [Tue, 7 Jan 2020 13:55:47 +0000 (14:55 +0100)]
avformat/utils: Fix memleaks in avformat_open_input()

A demuxer might have allocated memory while reading the header. If
reading the header was successfull and an error happens before returning
(e.g. when queueing the attached pictures), the read_close function
would have never been called, so that all those allocations would leak.
This commit changes this.

Furthermore, there would be even more memleaks if the error level was
set to AV_EF_EXPLODE in case there is both metadata and id3v2 metadata.
This has been fixed, too.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agocompat/os2threads: define INCL_DOSERRORS
Dave Yeo [Thu, 13 Feb 2020 04:13:00 +0000 (20:13 -0800)]
compat/os2threads: define INCL_DOSERRORS

This is needed to pull in the define for ERROR_TIMEOUT

Signed-off-by: Dave Yeo <daveryeo@telus.net>
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoMAINTAINERS: Add myself as libzmq maintainer
Andriy Gelman [Thu, 13 Feb 2020 00:17:06 +0000 (19:17 -0500)]
MAINTAINERS: Add myself as libzmq maintainer

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavutil/hwcontext_d3d11va: Use secure dlopen.
Matt Oliver [Mon, 30 Dec 2019 15:59:39 +0000 (02:59 +1100)]
avutil/hwcontext_d3d11va: Use secure dlopen.

dlopen contains additional security to prevent dll hijacking compared to standard LoadLibrary.

4 years agoavfilter/vf_phase: add >8 bit support
Paul B Mahol [Sat, 15 Feb 2020 10:58:44 +0000 (11:58 +0100)]
avfilter/vf_phase: add >8 bit support

4 years agoavcodec: add cdtoons decoder
Alyssa Milburn [Sun, 5 Jan 2020 18:41:14 +0000 (19:41 +0100)]
avcodec: add cdtoons decoder

This adds a decoder for Broderbund's sprite-based QuickTime CDToons
codec, based on the decoder I wrote for ScummVM.

Signed-off-by: Alyssa Milburn <amilburn@zall.org>
4 years agoavfilter/opencl: use av_fopen_utf8()
Paul B Mahol [Fri, 14 Feb 2020 20:48:54 +0000 (21:48 +0100)]
avfilter/opencl: use av_fopen_utf8()

4 years agoavfilter/vf_fieldhint: use av_fopen_utf8()
Paul B Mahol [Fri, 14 Feb 2020 20:47:55 +0000 (21:47 +0100)]
avfilter/vf_fieldhint: use av_fopen_utf8()

4 years agoavfilter/vf_lut3d: use av_fopen_utf8()
Paul B Mahol [Fri, 14 Feb 2020 20:44:38 +0000 (21:44 +0100)]
avfilter/vf_lut3d: use av_fopen_utf8()

4 years agoavcodec/pcm_tablegen: nits, reindent
Paul B Mahol [Fri, 14 Feb 2020 20:22:08 +0000 (21:22 +0100)]
avcodec/pcm_tablegen: nits, reindent

4 years agolavu/tx: improve 3-point fixed precision
Lynne [Fri, 14 Feb 2020 19:55:00 +0000 (19:55 +0000)]
lavu/tx: improve 3-point fixed precision

There's just no reason not to when its so easy (albeit messy) and its also
reducing the precision of all non-power-of-two transforms that use it.

4 years agoavcodec/dstdec: Use local channels variable
Michael Niedermayer [Thu, 13 Feb 2020 19:41:45 +0000 (20:41 +0100)]
avcodec/dstdec: Use local channels variable

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agofftools/ffprobe: Remove unneeded casts
Andreas Rheinhardt [Tue, 6 Aug 2019 01:17:06 +0000 (03:17 +0200)]
fftools/ffprobe: Remove unneeded casts

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/dvdsub: Fix warning about incompatible pointer type
Andreas Rheinhardt [Fri, 14 Feb 2020 11:24:03 +0000 (12:24 +0100)]
avcodec/dvdsub: Fix warning about incompatible pointer type

Fixes "passing argument 2 of ‘strtoul’ from incompatible pointer
type [-Wincompatible-pointer-types]" ("expected ‘char ** restrict’ but
argument is of type ‘const char **’") for GCC and "passing 'const char
**' to parameter of type 'char **' discards qualifiers in nested pointer
types [-Wincompatible-pointer-types-discards-qualifiers]" for Clang.

The cast itself is safe; it is only needed because strtoul itself is not
const-correct.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavfilter/vf_remap: add fill color option
Paul B Mahol [Fri, 14 Feb 2020 12:14:02 +0000 (13:14 +0100)]
avfilter/vf_remap: add fill color option

4 years agoavfilter: add pad opencl filter
Paul B Mahol [Thu, 6 Feb 2020 16:41:08 +0000 (17:41 +0100)]
avfilter: add pad opencl filter

4 years agoavcodec/cbs_av1: add missing value constrains to point_y_value, point_cb_value and...
James Almer [Thu, 13 Feb 2020 02:40:22 +0000 (23:40 -0300)]
avcodec/cbs_av1: add missing value constrains to point_y_value, point_cb_value and point_cr_value

If i is greater than 0, it is a requirement of bitstream conformance that point_y_value[ i ] is greater than point_y_value[ i - 1 ].
If i is greater than 0, it is a requirement of bitstream conformance that point_cb_value[ i ] is greater than point_cb_value[ i - 1 ].
If i is greater than 0, it is a requirement of bitstream conformance that point_cr_value[ i ] is greater than point_cr_value[ i - 1 ].

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agolavu/tx: slightly optimize fft15
Lynne [Mon, 10 Feb 2020 17:37:34 +0000 (17:37 +0000)]
lavu/tx: slightly optimize fft15

Saves 2 additions.

4 years agolavu/tx: undef the correct macro
Lynne [Mon, 10 Feb 2020 17:36:45 +0000 (17:36 +0000)]
lavu/tx: undef the correct macro

It was renamed and no warning was given for undeffing a nonexisting one.

4 years agolavu/tx: implement 32 bit fixed point FFT and MDCT
Lynne [Sat, 8 Feb 2020 23:13:28 +0000 (23:13 +0000)]
lavu/tx: implement 32 bit fixed point FFT and MDCT

Required minimal changes to the code so made sense to implement.
FFT and MDCT tested, the output of both was properly rounded.
Fun fact: the non-power-of-two fixed-point FFT and MDCT are the fastest ever
non-power-of-two fixed-point FFT and MDCT written.
This can replace the power of two integer MDCTs in aac and ac3 if the
MIPS optimizations are ported across.
Unfortunately the ac3 encoder uses a 16-bit fixed point forward transform,
unlike the encoder which uses a 32bit inverse transform, so some modifications
might be required there.

The 3-point FFT is somewhat less accurate than it otherwise could be,
having minor rounding errors with bigger transforms. However, this
could be improved later, and the way its currently written is the way one
would write assembly for it.
Similar rounding errors can also be found throughout the power of two FFTs
as well, though those are more difficult to correct.
Despite this, the integer transforms are more than accurate enough.

4 years agoavcodec/midivid: only multiple of 4 width/height are possible
Paul B Mahol [Thu, 13 Feb 2020 11:15:42 +0000 (12:15 +0100)]
avcodec/midivid: only multiple of 4 width/height are possible

4 years agoavcodec/midivid: improve decoding of widths not multiple of 32
Paul B Mahol [Thu, 13 Feb 2020 09:11:20 +0000 (10:11 +0100)]
avcodec/midivid: improve decoding of widths not multiple of 32

4 years agoavcodec/h264_ps: Return error if pps has FMO parameters
Andriy Gelman [Wed, 12 Feb 2020 23:36:56 +0000 (18:36 -0500)]
avcodec/h264_ps: Return error if pps has FMO parameters

FMO is not supported and fields related to FMO are not parsed, meaning
that any fields which follow will be corrupt.

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agofftools/ffmpeg: Integrate two checks
Andreas Rheinhardt [Sat, 12 Oct 2019 03:18:39 +0000 (05:18 +0200)]
fftools/ffmpeg: Integrate two checks

For audio packets with dts != AV_NOPTS_VALUEs the dts was converted
twice to the muxer's timebase during streamcopy, once as a normal
packet and once specifically as an audio packet. This has been changed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/avcodec: Nits
Andreas Rheinhardt [Tue, 10 Dec 2019 21:59:55 +0000 (22:59 +0100)]
avcodec/avcodec: Nits

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/apedec: Fix invalid shift with 24 bps
Michael Niedermayer [Tue, 11 Feb 2020 22:56:45 +0000 (23:56 +0100)]
avcodec/apedec: Fix invalid shift with 24 bps

Fixes: left shift of negative value -463
Fixes: 20542/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5688714435231744
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>
4 years agoavfilter/vf_xmedian: implement percentile option
Paul B Mahol [Wed, 12 Feb 2020 13:34:00 +0000 (14:34 +0100)]
avfilter/vf_xmedian: implement percentile option

4 years agoavfilter/vf_median: implement percentile option
Paul B Mahol [Wed, 12 Feb 2020 10:25:25 +0000 (11:25 +0100)]
avfilter/vf_median: implement percentile option

4 years agoavcodec/h264_ps: Show VUI and SPS overread messages just once per frame thread
Michael Niedermayer [Thu, 16 Jan 2020 16:51:29 +0000 (17:51 +0100)]
avcodec/h264_ps: Show VUI and SPS overread messages just once per frame thread

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavutil/log: Add av_log_once() for printing a message just once with a high log level
Michael Niedermayer [Thu, 16 Jan 2020 15:34:07 +0000 (16:34 +0100)]
avutil/log: Add av_log_once() for printing a message just once with a high log level

Compared to ad-hoc if(printed) ... code this allows the user to disable
it by adjusting the log level

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/utils: Fix undefined behavior in ff_configure_buffers_for_index()
Dale Curtis [Wed, 29 Jan 2020 00:49:14 +0000 (16:49 -0800)]
avformat/utils: Fix undefined behavior in ff_configure_buffers_for_index()

When e2_pts == INT64_MIN and e1_pts >= 0 the calculation of
e2_pts - e1_pts will overflow an int64_t.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/libvpxenc: add a way to explicitly set temporal layer id
Wonkap Jang [Mon, 10 Feb 2020 18:30:09 +0000 (10:30 -0800)]
avcodec/libvpxenc: add a way to explicitly set temporal layer id

In order for rate control to correctly allocate bitrate to each temporal
layer, correct temporal layer id has to be set to each frame. This
commit provides the ability to set correct temporal layer id for each
frame.

Signed-off-by: James Zern <jzern@google.com>
4 years agoavfilter/vf_colorlevels: add support for commands
Paul B Mahol [Tue, 11 Feb 2020 13:19:56 +0000 (14:19 +0100)]
avfilter/vf_colorlevels: add support for commands

4 years agoavfilter/vf_colorkey: add support for commands
Paul B Mahol [Tue, 11 Feb 2020 12:57:43 +0000 (13:57 +0100)]
avfilter/vf_colorkey: add support for commands

4 years agolibfdk-aacdec: Allow explicitly disabling the DRC reference level option
Martin Storsjö [Tue, 4 Feb 2020 14:23:27 +0000 (16:23 +0200)]
libfdk-aacdec: Allow explicitly disabling the DRC reference level option

Previously, it was always left in the automatic mode, if the option
was set to the only special (negative) value. Now there's two separate
special values for this option, -1 for automatic (metadata based)
and -2 for explicitly disabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agolibfdk-aacdec: Use the decoder's default level limiter settings
Martin Storsjö [Tue, 4 Feb 2020 14:07:06 +0000 (16:07 +0200)]
libfdk-aacdec: Use the decoder's default level limiter settings

It was disabled by default in 2dbd35b00c6433e587d5f44d5dbc8972ebbaa88e
as it added delay, but now we compensate for the delay properly
by offsetting timestamps.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agolibfdk-aacdec: Apply the decoder's output delay on timestamps
Martin Storsjö [Tue, 4 Feb 2020 14:03:57 +0000 (16:03 +0200)]
libfdk-aacdec: Apply the decoder's output delay on timestamps

The delay is normally zero when the level limiter is disabled,
but if enabled, there's a small delay.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agoavformat/mpjpegdec: Remove redundant initializations
Andreas Rheinhardt [Tue, 7 Jan 2020 13:55:43 +0000 (14:55 +0100)]
avformat/mpjpegdec: Remove redundant initializations

The AVPacket destined for a demuxer's output has already been
initialized before it reaches the demuxer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavfilter/vf_dedot: Fix leak of AVFrame if making it writable fails
Andreas Rheinhardt [Sun, 9 Feb 2020 18:40:34 +0000 (19:40 +0100)]
avfilter/vf_dedot: Fix leak of AVFrame if making it writable fails

Even in this scenario, the frame still contains references to data that
won't be freed if the frame isn't unreferenced. And the AVFrame itself
will leak, too.

Fixes Coverity issue #1441422.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat: Remove unnecessary av_packet_unref()
Andreas Rheinhardt [Tue, 7 Jan 2020 13:55:40 +0000 (14:55 +0100)]
avformat: Remove unnecessary av_packet_unref()

Since bae8844e the packet will always be unreferenced when a demuxer
returns an error, so that a lot of calls to av_packet_unref() in lots of
demuxers are now redundant and can be removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/tty: fix last timestamp for fate
Paul B Mahol [Mon, 10 Feb 2020 15:47:03 +0000 (16:47 +0100)]
avformat/tty: fix last timestamp for fate

4 years agoavfilter/vf_thumbnail: fix possible crash on error
Paul B Mahol [Mon, 10 Feb 2020 14:42:52 +0000 (15:42 +0100)]
avfilter/vf_thumbnail: fix possible crash on error

4 years agoavfilter/vf_thumbnail: add timeline support
Paul B Mahol [Mon, 10 Feb 2020 14:42:27 +0000 (15:42 +0100)]
avfilter/vf_thumbnail: add timeline support

4 years agolibswscale/x86/yuv2rgb: add ssse3 version
Ting Fu [Sun, 19 Jan 2020 03:51:04 +0000 (11:51 +0800)]
libswscale/x86/yuv2rgb: add ssse3 version

Tested using this command:
/ffmpeg -pix_fmt yuv420p -s 1920*1080 -i ArashRawYuv420.yuv \
-vcodec rawvideo -s 1920*1080 -pix_fmt rgb24 -f null /dev/null

The fps increase from 389 to 640 on Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz

Signed-off-by: Ting Fu <ting.fu@intel.com>
4 years agoavformat/tty: add seeking support
Paul B Mahol [Sun, 2 Feb 2020 13:03:45 +0000 (14:03 +0100)]
avformat/tty: add seeking support

4 years agoavformat/tty: make probing strict for first 8 bytes
Paul B Mahol [Sun, 2 Feb 2020 12:51:49 +0000 (13:51 +0100)]
avformat/tty: make probing strict for first 8 bytes

4 years agoavcodec/cbs_jpeg: Use memcpy when writing pictures
Andreas Rheinhardt [Tue, 19 Nov 2019 16:12:28 +0000 (17:12 +0100)]
avcodec/cbs_jpeg: Use memcpy when writing pictures

This is possible because the size of a scan header is always a multiple
of a byte.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years agoavcodec/cbs_mpeg2: Treat slices without data as invalid
Andreas Rheinhardt [Mon, 9 Dec 2019 22:26:04 +0000 (23:26 +0100)]
avcodec/cbs_mpeg2: Treat slices without data as invalid

They are spec-incompliant.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/dpcm: Fix integer overflow in AV_CODEC_ID_GREMLIN_DPCM
Michael Niedermayer [Wed, 22 Jan 2020 22:11:47 +0000 (23:11 +0100)]
avcodec/dpcm: Fix integer overflow in AV_CODEC_ID_GREMLIN_DPCM

Fixes: signed integer overflow: -2147479324 + -32568 cannot be represented in type 'int'
Fixes: 20103/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GREMLIN_DPCM_fuzzer-5667667579240448
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/wmalosslessdec: Fix integer overflow with sliding in padding bits
Michael Niedermayer [Sat, 18 Jan 2020 18:55:23 +0000 (19:55 +0100)]
avcodec/wmalosslessdec: Fix integer overflow with sliding in padding bits

Fixes: signed integer overflow: -53716100 * 256 cannot be represented in type 'int'
Fixes: 20143/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5716604000403456
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/wmalosslessdec: Fix loop in revert_acfilter()
Michael Niedermayer [Sat, 18 Jan 2020 18:28:36 +0000 (19:28 +0100)]
avcodec/wmalosslessdec: Fix loop in revert_acfilter()

Fixes: out of array read
Fixes: 20059/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5691776237305856
No testcase except the fuzzed one.

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/mvha: Check remaining bits in VLC decode loop
Michael Niedermayer [Wed, 15 Jan 2020 21:13:14 +0000 (22:13 +0100)]
avcodec/mvha: Check remaining bits in VLC decode loop

Fixes: timeout (252sec -> 170msec)
Fixes: 20023/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MVHA_fuzzer-5681192565473280
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/agm: YUV420 without DCT needs even dimensions
Michael Niedermayer [Fri, 10 Jan 2020 20:30:38 +0000 (21:30 +0100)]
avcodec/agm: YUV420 without DCT needs even dimensions

Fixes: out of array access
Fixes: 19892/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5707525924323328
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolibswscale/utils.c: Fix bug #8255
Gautam Ramakrishnan [Sun, 9 Feb 2020 18:33:09 +0000 (00:03 +0530)]
libswscale/utils.c: Fix bug #8255

Bug #8255 points out a double free error in libwscale/utils.c file.
The double free is because the pointer to cascaded_context of an
sw_context is not set to NULL after freeing it. When the sw_context
is later freed, sws_freeContext is called on the cascaded_context,
causing a double free.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/agm: Test remaining data in decode_raw_intra_rgb()
Michael Niedermayer [Sat, 8 Feb 2020 20:17:01 +0000 (21:17 +0100)]
avcodec/agm: Test remaining data in decode_raw_intra_rgb()

Fixes: Timeout (270sec -> 25ms)
Fixes: 20485/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5636954207289344
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>
4 years agoavformat/tty: Fix division by 0 in probe
Michael Niedermayer [Wed, 5 Feb 2020 21:22:30 +0000 (22:22 +0100)]
avformat/tty: Fix division by 0 in probe

Fixes: division by zero
Fixes: 20436/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5763229752229888
Fixes: 20503/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4841641154445312
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>
4 years agolibavcodec/mvha: Check height before applying median predictor
Michael Niedermayer [Sun, 9 Feb 2020 14:02:45 +0000 (15:02 +0100)]
libavcodec/mvha: Check height before applying median predictor

Fixes: out of array read
Fixes: 20495/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MVHA_fuzzer-5711179129552896
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>
4 years agoavcodec/midivid: Check vector index
Michael Niedermayer [Sun, 9 Feb 2020 13:53:15 +0000 (14:53 +0100)]
avcodec/midivid: Check vector index

Fixes: out of array read
Fixes: 20494/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MVDV_fuzzer-5681452423577600
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>
4 years agoavcodec/cbs: Fix potential double-free when adding unit fails
Andreas Rheinhardt [Mon, 18 Nov 2019 07:47:58 +0000 (08:47 +0100)]
avcodec/cbs: Fix potential double-free when adding unit fails

ff_cbs_insert_unit_data() has two modes of operation: It can insert a
unit with a newly created reference to an already existing AVBuffer; or
it can take a buffer and create an AVBuffer for it. Said buffer will
then become owned by the unit lateron.

A potential memleak/double-free exists in the second case, because if
creating the AVBuffer fails, the function immediately returns, but when
it fails lateron, the supplied buffer will be freed. The caller has no
way to distinguish between these two outcomes. The only such caller
(cbs_jpeg_split_fragment() in cbs_jpeg.c) opted for a potential
double-free.

This commit changes this by explicitly stating that a non-refcounted
buffer will be freed on error. The aforementioned caller has been
brought in line with this.

Fixes CID 1452623.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years agoavfilter/vf_fade: fix color fading for planar rgb
Paul B Mahol [Sun, 9 Feb 2020 21:50:07 +0000 (22:50 +0100)]
avfilter/vf_fade: fix color fading for planar rgb

4 years agoavfilter/vf_fade: add >8 bit support for black and alpha fade
Paul B Mahol [Sat, 8 Feb 2020 12:16:44 +0000 (13:16 +0100)]
avfilter/vf_fade: add >8 bit support for black and alpha fade

4 years agodoc/ffmpeg: Document device selection for Vulkan
Mark Thompson [Sun, 9 Feb 2020 19:15:53 +0000 (19:15 +0000)]
doc/ffmpeg: Document device selection for Vulkan

4 years agolavfi/vf_*_vaapi: Fix error case
Mark Thompson [Sun, 29 Sep 2019 16:46:04 +0000 (17:46 +0100)]
lavfi/vf_*_vaapi: Fix error case

Fixes CID 14524001452416145255014525901452760.

4 years agolavfi/vf_deshake_opencl: Avoid propagating uninitialised data
Mark Thompson [Sun, 29 Sep 2019 16:46:03 +0000 (17:46 +0100)]
lavfi/vf_deshake_opencl: Avoid propagating uninitialised data

Fixes CID 1452753.

4 years agolavc/vp9_raw_reorder_bsf: Fix operator ordering
Mark Thompson [Sun, 29 Sep 2019 16:46:01 +0000 (17:46 +0100)]
lavc/vp9_raw_reorder_bsf: Fix operator ordering

Fixes CID 1413024.

4 years agolavc/vaapi_encode: Fix leak in error case
Mark Thompson [Sun, 29 Sep 2019 16:46:00 +0000 (17:46 +0100)]
lavc/vaapi_encode: Fix leak in error case

Fixes CID 1442564.

4 years agolavc/h265_metadata_bsf: Fix parameter ordering
Mark Thompson [Sun, 29 Sep 2019 16:45:59 +0000 (17:45 +0100)]
lavc/h265_metadata_bsf: Fix parameter ordering

Fixes CID 1452433.

4 years agolavc/cbs_h2645: Add missing newlines in log messages
Mark Thompson [Sun, 29 Sep 2019 16:45:58 +0000 (17:45 +0100)]
lavc/cbs_h2645: Add missing newlines in log messages

4 years agoavutil/log: add support for multibyte console log for win32
Marton Balint [Wed, 29 Jan 2020 00:10:38 +0000 (01:10 +0100)]
avutil/log: add support for multibyte console log for win32

Fixes ticket #5398.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavutil/log: add support for forced ANSI colors on win32
Marton Balint [Tue, 28 Jan 2020 23:30:06 +0000 (00:30 +0100)]
avutil/log: add support for forced ANSI colors on win32

To make behavior the same as non-win32 code when the standard error is
redirected. Also restructure the code a bit.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavutil/log: fix detecting console mode on Win32
Marton Balint [Tue, 28 Jan 2020 23:46:01 +0000 (00:46 +0100)]
avutil/log: fix detecting console mode on Win32

A redirected stderr can still have a valid handle.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavutil/log: factorize ansi_fputs
Marton Balint [Tue, 28 Jan 2020 23:32:27 +0000 (00:32 +0100)]
avutil/log: factorize ansi_fputs

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavutil/log: drop support for NO_COLOR environment variable
Marton Balint [Tue, 28 Jan 2020 22:55:18 +0000 (23:55 +0100)]
avutil/log: drop support for NO_COLOR environment variable

Deprecated for more than 9 years now.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agolibavcodec/amfenc_hevc.c: Fix Maximum Reference Frames option on AMF HEVC.
Sitan Liu [Mon, 3 Feb 2020 21:54:15 +0000 (00:54 +0300)]
libavcodec/amfenc_hevc.c: Fix Maximum Reference Frames option on AMF HEVC.

4 years agolibavcodec/amfenc_hevc.c: Fix Profile level option on AMF HEVC.
Sitan Liu [Mon, 3 Feb 2020 21:54:14 +0000 (00:54 +0300)]
libavcodec/amfenc_hevc.c: Fix Profile level option on AMF HEVC.

4 years agoavfilter/af_afftfilt: fix memory leaks on error
Paul B Mahol [Sun, 9 Feb 2020 14:49:09 +0000 (15:49 +0100)]
avfilter/af_afftfilt: fix memory leaks on error

4 years agoavfilter/af_afffilt: fix crash on error
Paul B Mahol [Sun, 9 Feb 2020 14:42:48 +0000 (15:42 +0100)]
avfilter/af_afffilt: fix crash on error

4 years agoavfilter/vf_xfade: add diagonal smooth transitions
Paul B Mahol [Sun, 9 Feb 2020 11:59:56 +0000 (12:59 +0100)]
avfilter/vf_xfade: add diagonal smooth transitions

4 years agoavfilter/af_asoftclip: add support for commands
Paul B Mahol [Sun, 9 Feb 2020 09:59:20 +0000 (10:59 +0100)]
avfilter/af_asoftclip: add support for commands

4 years agoavfilter/af_asoftclip: add slice threading support
Paul B Mahol [Sun, 9 Feb 2020 09:47:43 +0000 (10:47 +0100)]
avfilter/af_asoftclip: add slice threading support

4 years agodoc/APIchanges: fix vulkan hwcontext date
Lynne [Sat, 8 Feb 2020 23:32:46 +0000 (23:32 +0000)]
doc/APIchanges: fix vulkan hwcontext date

4 years agolavu/tx: mention FFT output is not normalized
Lynne [Sat, 8 Feb 2020 23:06:09 +0000 (23:06 +0000)]
lavu/tx: mention FFT output is not normalized

Not even FFTW's output is normalized.
This should prevent at least some users from complaining that doing a forward
transform followed by an inverse transform has a mismatching output to the
original input.

4 years agocheckasm: sbrdsp: Fix a spurious test failure by calculating a better epsilon for...
Martin Storsjö [Wed, 5 Feb 2020 20:18:19 +0000 (22:18 +0200)]
checkasm: sbrdsp: Fix a spurious test failure by calculating a better epsilon for sum_square

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agoavfilter/vf_alphamerge: add AVClass to private context
Paul B Mahol [Sat, 8 Feb 2020 20:54:09 +0000 (21:54 +0100)]
avfilter/vf_alphamerge: add AVClass to private context

4 years agoavfilter/vf_paletteuse: Fix potential double-free of AVFrame
Andreas Rheinhardt [Mon, 27 Jan 2020 08:28:20 +0000 (09:28 +0100)]
avfilter/vf_paletteuse: Fix potential double-free of AVFrame

apply_palette() would free an AVFrame given to it only via an AVFrame *
(and not via AVFrame **) in three of its four exists (namely in the
normal path and in two error paths). So upon error the caller has no way
to know whether the frame has already been freed or not;
load_apply_palette(), the only caller, opted to free the frame in this
scenario.

This commit changes this by making apply_palette not freeing the frame
at all, which is left to load_apply_palette().

Fixes Coverity issue #1452434.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/mlpdec: use get_bits_long for huff lsbs
Jai Luthra [Fri, 7 Feb 2020 20:16:12 +0000 (01:46 +0530)]
avcodec/mlpdec: use get_bits_long for huff lsbs

lsb bits may go beyond 25 bits, so to be safe use get_bits_long

Signed-off-by: Jai Luthra <me@jailuthra.in>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/vf_alphamerge: add timeline support
Paul B Mahol [Sat, 8 Feb 2020 13:28:01 +0000 (14:28 +0100)]
avfilter/vf_alphamerge: add timeline support