ffmpeg.git
3 months agoavformat/webm_chunk: Add init function
Andreas Rheinhardt [Sat, 29 Feb 2020 23:33:18 +0000 (00:33 +0100)]
avformat/webm_chunk: Add init function

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Remove unnecessary variable
Andreas Rheinhardt [Sat, 29 Feb 2020 23:23:38 +0000 (00:23 +0100)]
avformat/webm_chunk: Remove unnecessary variable

chunk_start_index (which was set via an option) was only used to
initialize chunk_index and otherwise unused. So initialize chunk_index
directly via the option and remove chunk_start_index.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Don't copy header filename
Andreas Rheinhardt [Sat, 29 Feb 2020 23:13:07 +0000 (00:13 +0100)]
avformat/webm_chunk: Don't copy header filename

Instead just reuse the filename string that is given via an option
for the child muxer's url field.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Don't keep pointer to AVOutputFormat
Andreas Rheinhardt [Sat, 29 Feb 2020 22:49:19 +0000 (23:49 +0100)]
avformat/webm_chunk: Don't keep pointer to AVOutputFormat

It is no longer needed given that the function pointers of the child
muxer's AVOutputFormat are no longer called directly.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Avoid unnecessary flushes
Andreas Rheinhardt [Sun, 1 Mar 2020 03:56:07 +0000 (04:56 +0100)]
avformat/webm_chunk: Avoid unnecessary flushes

The webm_chunk muxer caches its output to a dynamic buffer and when it
outputs anything, it explicitly flushes it. So set the flags indicating
that flushing after each packet should not be done automatically
(basically avoiding avio_write_marker() to be called by flush_if_needed()
in libavformat/mux.c).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Use API functions for child muxer
Andreas Rheinhardt [Sat, 29 Feb 2020 21:47:26 +0000 (22:47 +0100)]
avformat/webm_chunk: Use API functions for child muxer

instead of calling the write_header/packet/trailer functions directly
via the function pointers. Also, use distinct AVStreams for the child
AVFormatContext (up until now the two AVFormatContexts shared their
AVStreams because allocating their own was deemed too onerous).

Using the function pointers directly meant that the Matroska muxer's
init-function was never called, because init-functions were only
introduced a few months after webm_chunk has been added and no one
thought of/bothered to adapt webm_chunk for this (when the init-function
was added in b287d7ea, the code setting the timebase was moved to it,
so that the timebases were no longer set to ms-precision when using
the webm_chunk muxer; this has been fixed after some time in 42a635dd
by setting the timebases direcly (instead of calling the init-function)).

And when 982a98a0 added a deinit-function for the Matroska muxer, it
introduced memleaks in webm_chunk, because the child muxer's internal
structures were no longer freed when calling write_trailer directly.
(Given that the init function has never ever been called, the child
muxer has never ever been properly initialized, so that the
deinit-function was not called when freeing the child context.)

This commit stops calling the function pointers directly and instead
uses the standard API functions for muxers. This fixes the above
mentioned memleaks. (Memleaks are still possible on error. This will be
fixed in a future commit that adds a deinit-function to webm_chunk
itself.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Use appropriate initializer for AV_OPT_TYPE_STRING
Andreas Rheinhardt [Sat, 29 Feb 2020 20:52:08 +0000 (21:52 +0100)]
avformat/webm_chunk: Use appropriate initializer for AV_OPT_TYPE_STRING

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Copy more information to the child AVFormatContext
Andreas Rheinhardt [Sat, 29 Feb 2020 20:09:29 +0000 (21:09 +0100)]
avformat/webm_chunk: Copy more information to the child AVFormatContext

In particular the flags are important so that AVFMT_FLAG_BITEXACT can be
honoured by the child muxer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Close IO if writing header fails
Andreas Rheinhardt [Sat, 29 Feb 2020 20:00:17 +0000 (21:00 +0100)]
avformat/webm_chunk: Close IO if writing header fails

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Don't use child AVFormatContext for logging
Andreas Rheinhardt [Sat, 29 Feb 2020 19:01:33 +0000 (20:01 +0100)]
avformat/webm_chunk: Don't use child AVFormatContext for logging

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webmdashenc: Don't use custom option for bitexactness
Andreas Rheinhardt [Tue, 17 Mar 2020 22:13:05 +0000 (23:13 +0100)]
avformat/webmdashenc: Don't use custom option for bitexactness

The WebM DASH Manifest muxer can write manifests for live streams and
these contain an entry that depends on the time the manifest is written;
an AVOption to make the output reproducible has been added for tests.
But this is unnecessary, as there already is a method for reproducible
output: The AVFMT_FLAG_BITEXACT-flag of the AVFormatContext. Therefore
this commit removes the custom option.

Given that the description of said option contained "private option -
users should never set this" and that it was not documented in
muxers.texi, no deprecation period for this option seemed necessary.

The commands of the FATE-tests for this muxer have been changed to no
longer use this option.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroska: add missing Buttons track type
Steve Lhomme [Sun, 22 Mar 2020 08:59:20 +0000 (09:59 +0100)]
avformat/matroska: add missing Buttons track type

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavcodec/dvbsubdec: replace data_size with got_sub_ptr for better readability
Limin Wang [Tue, 24 Mar 2020 11:05:19 +0000 (19:05 +0800)]
avcodec/dvbsubdec: replace data_size with got_sub_ptr for better readability

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/libzvbi-teletextdec: replace data_size with got_sub_ptr for better readability
Limin Wang [Tue, 24 Mar 2020 11:05:18 +0000 (19:05 +0800)]
avcodec/libzvbi-teletextdec: replace data_size with got_sub_ptr for better readability

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/pgssubdec: replace data_size with got_sub_ptr for better readability
Limin Wang [Tue, 24 Mar 2020 11:05:17 +0000 (19:05 +0800)]
avcodec/pgssubdec: replace data_size with got_sub_ptr for better readability

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/xsubdec: replace data_size with got_sub_ptr for better readability
Limin Wang [Tue, 24 Mar 2020 11:05:16 +0000 (19:05 +0800)]
avcodec/xsubdec: replace data_size with got_sub_ptr for better readability

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavfilter/vf_v360: fix hfov/vfov calculation from dfov for sg projection
Paul B Mahol [Wed, 25 Mar 2020 12:38:01 +0000 (13:38 +0100)]
avfilter/vf_v360: fix hfov/vfov calculation from dfov for sg projection

3 months agoavcodec/hevc: Cosmetics: Realign after last commit
Andreas Rheinhardt [Tue, 24 Mar 2020 22:47:00 +0000 (23:47 +0100)]
avcodec/hevc: Cosmetics: Realign after last commit

Suggested-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavcodec/hevc, h2645_parse: Fix HEVC NAL unit names and constants
Andreas Rheinhardt [Tue, 17 Mar 2020 23:11:56 +0000 (00:11 +0100)]
avcodec/hevc, h2645_parse: Fix HEVC NAL unit names and constants

This commit fixes the names and constants of the reserved NAL units
with nal_unit_type 22 resp. 23. They were "IRAP_IRAP_VLC2x", but are
actually "RSV_IRAP_VLC2x".

This also required a change to cbs_h265_syntax_template.c.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/dss: Use AV_DICT_DONT_STRDUP_VAL to save a malloc+memcpy
Andreas Rheinhardt [Sun, 10 Nov 2019 01:48:21 +0000 (02:48 +0100)]
avformat/dss: Use AV_DICT_DONT_STRDUP_VAL to save a malloc+memcpy

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavcodec/dfa: Use array of fixed-sized strings for fixed-sized strings
Andreas Rheinhardt [Wed, 18 Mar 2020 01:22:43 +0000 (02:22 +0100)]
avcodec/dfa: Use array of fixed-sized strings for fixed-sized strings

Surprisingly neither GCC nor Clang did this transformation on their own.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/hls: Don't strdup non-null-terminated string
Andreas Rheinhardt [Tue, 3 Mar 2020 02:41:13 +0000 (03:41 +0100)]
avformat/hls: Don't strdup non-null-terminated string

If an URI indicated that the data protocol was in use, it would be
copied into a temporary buffer via strncpy(dst, src, strlen(src)),
thereby ensuring that the trailing \0 would not be copied, despite dst
being uninitialized. dst would then be av_strdup'ed, leading to
potential segfaults.

The solution to this is simple: Don't copy the URI in the temporary
buffer at all, instead av_strdup it directly.

This fixes a -Wstringop-truncation warning emitted by GCC 9.2.

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavfilter/vf_paletteuse: Forward error codes
Andreas Rheinhardt [Mon, 27 Jan 2020 07:40:08 +0000 (08:40 +0100)]
avfilter/vf_paletteuse: Forward error codes

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavfilter/hue: fix range in comment
Gyan Doshi [Tue, 24 Mar 2020 09:34:52 +0000 (15:04 +0530)]
avfilter/hue: fix range in comment

Found-by: Michael Koch
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
3 months agoMAINTAINERS: add my gpg fingerprint
Ramiro Polla [Mon, 23 Mar 2020 03:02:25 +0000 (04:02 +0100)]
MAINTAINERS: add my gpg fingerprint

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/mxfdec: use av_asprintf()
Limin Wang [Sun, 22 Mar 2020 15:03:21 +0000 (23:03 +0800)]
avformat/mxfdec: use av_asprintf()

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agolavu/tx: add 2-point FFT transform
Lynne [Tue, 25 Feb 2020 06:49:26 +0000 (06:49 +0000)]
lavu/tx: add 2-point FFT transform

By itself, this allows 6-point, 10-point and 30-point transforms.
When the 9-point transform is added it allows for 18-point FFT,
and also for a 36-point MDCT (used by MP3).

3 months agolavu/tx: improve documentation
Lynne [Sat, 14 Mar 2020 16:10:06 +0000 (16:10 +0000)]
lavu/tx: improve documentation

3 months agoavcodec/wmadec: cosmetics
Ramiro Polla [Tue, 5 Nov 2019 10:13:50 +0000 (11:13 +0100)]
avcodec/wmadec: cosmetics

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavcodec/get_bits: cosmetics
Ramiro Polla [Tue, 5 Nov 2019 10:13:49 +0000 (11:13 +0100)]
avcodec/get_bits: cosmetics

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavcodec/decode: increase nb_bsfs after av_bsf_alloc in case alloc failed
Limin Wang [Tue, 24 Dec 2019 01:06:18 +0000 (09:06 +0800)]
avcodec/decode: increase nb_bsfs after av_bsf_alloc in case alloc failed

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/hnm: Check for extradata allocation failure
Andreas Rheinhardt [Sat, 21 Mar 2020 06:31:17 +0000 (07:31 +0100)]
avformat/hnm: Check for extradata allocation failure

and also add padding to it; moreover, don't use memcpy to write one byte
to extradata.

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>
3 months agoavformat/subtitles: Don't increment packet counter prematurely
Andreas Rheinhardt [Sat, 21 Mar 2020 03:50:20 +0000 (04:50 +0100)]
avformat/subtitles: Don't increment packet counter prematurely

Do it only if the packet has been successfully allocated in
av_new_packet() -- otherwise on error a completely uninitialized packet
would be unreferenced later.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/bethsoftvid: Fix potential memleak upon reallocation failure
Andreas Rheinhardt [Sat, 21 Mar 2020 02:57:32 +0000 (03:57 +0100)]
avformat/bethsoftvid: Fix potential memleak upon reallocation failure

The classical ptr = av_realloc(ptr, size), just with av_fast_realloc().

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>
3 months agoavformat/bethsoftvid: Avoid allocations and frees for palettes
Andreas Rheinhardt [Sat, 21 Mar 2020 03:30:27 +0000 (04:30 +0100)]
avformat/bethsoftvid: Avoid allocations and frees for palettes

by putting the palette in the demuxer's context. This also allows to
remove this demuxer's read_close-function.

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>
3 months agoavcodec/bsf: Beautify log messages from bitstream filters
Andreas Rheinhardt [Tue, 17 Mar 2020 21:31:47 +0000 (22:31 +0100)]
avcodec/bsf: Beautify log messages from bitstream filters

Up until now, the name of every AVBSFContext for logging purposes was
"AVBSFContext", so that the default logging callback produced output
like "[AVBSFContext @ 0x55813bae92c0] Extradata". This has been changed
to "[trace_headers @ 0x60a000000700] Extradata" by adding an item_name-
function to the AVClass for bitstream filters.

Furthermore, the correct category has been set so that the introductory
part before the actual message (everything before "Extradata" in the
above examples) are displayed in a different colour than the rest.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavcodec/bsf: Don't set defaults for AVClass without options
Andreas Rheinhardt [Tue, 17 Mar 2020 21:31:46 +0000 (22:31 +0100)]
avcodec/bsf: Don't set defaults for AVClass without options

This happened for AVBSFContext.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavformat/asfdec_f: Fix overflow check in get_tag()
Michael Niedermayer [Sun, 15 Mar 2020 16:26:51 +0000 (17:26 +0100)]
avformat/asfdec_f: Fix overflow check in get_tag()

Fixes: signed integer overflow: 2 * 1210064928 cannot be represented in type 'int'
Fixes: 20873/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5761116909338624

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agolavf/subviewerdec: Support higher sub-second precision.
Carl Eugen Hoyos [Fri, 20 Mar 2020 08:02:59 +0000 (09:02 +0100)]
lavf/subviewerdec: Support higher sub-second precision.

Fixes ticket #8575.

3 months agocommon.mak: Also clean Windows debug files.
Carl Eugen Hoyos [Wed, 18 Mar 2020 23:35:21 +0000 (00:35 +0100)]
common.mak: Also clean Windows debug files.

3 months agoavformat/bink: properly mark packets that are key frames
Paul B Mahol [Sun, 10 Mar 2019 19:33:19 +0000 (20:33 +0100)]
avformat/bink: properly mark packets that are key frames

3 months agoh264dec: do not export the chroma sample location immediately on parsing the SPS
Anton Khirnov [Sat, 29 Jul 2017 20:03:55 +0000 (22:03 +0200)]
h264dec: do not export the chroma sample location immediately on parsing the SPS

This SPS is not necessarily the one that will be used. Export the chroma
location along with all the other SPS properties.

3 months agosbcdec: do not unnecessarily set frame properties
Anton Khirnov [Wed, 29 Jan 2020 16:52:21 +0000 (17:52 +0100)]
sbcdec: do not unnecessarily set frame properties

Decoders are supposed to export stream properties in AVCodecContext, the
AVFrame properties are set from those in ff_get_buffer().

3 months agoavcodec/mpeg12dec: Add CPB coded side data
Nicolas Gaullier [Thu, 5 Mar 2020 08:17:24 +0000 (09:17 +0100)]
avcodec/mpeg12dec: Add CPB coded side data

This fixes mpeg2video stream copies to mpeg muxer like this:
  ffmpeg -i xdcamhd.mxf -c:v copy output.mpg

Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 months agoavcodec/utils: Fix ff_add_cpb_side_data() add twice
Nicolas Gaullier [Thu, 5 Mar 2020 08:17:23 +0000 (09:17 +0100)]
avcodec/utils: Fix ff_add_cpb_side_data() add twice

Makes it behave similarly to av_stream_add_side_data().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 months agoavformat/utils: Make find_stream_info get side data from codec context
Nicolas Gaullier [Thu, 5 Mar 2020 08:17:22 +0000 (09:17 +0100)]
avformat/utils: Make find_stream_info get side data from codec context

This will allow probing input coded side data, and also forwarding them to the output.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 months agoavcodec/mpeg12dec: Do not alter avctx->rc_buffer_size
Nicolas Gaullier [Thu, 5 Mar 2020 08:17:21 +0000 (09:17 +0100)]
avcodec/mpeg12dec: Do not alter avctx->rc_buffer_size

Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 months agohwcontext_opencl: include header file in HEADERS
Daniel Playfair Cal [Mon, 16 Mar 2020 01:20:46 +0000 (12:20 +1100)]
hwcontext_opencl: include header file in HEADERS

This matches the inclusion of the other hwcontext_<hwaccel>.h headers.
The skipping of the header depending on build flags is already present.

Signed-off-by: Daniel Playfair Cal: <daniel.playfair.cal@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 months agofftools/ffmpeg_opt: Fix [u]int64_t specifier string
Andreas Rheinhardt [Wed, 18 Mar 2020 02:56:18 +0000 (03:56 +0100)]
fftools/ffmpeg_opt: Fix [u]int64_t specifier string

PRId64 and PRIu64 already expand to the complete specifier; adding
another 'd' at the end is wrong and just leads to warnings that say
that only an option like '-frames:v 2d' will be used, although said
option won't be accepted at all ('Expected int64 for frames:v but found
2d').

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agodoc/general: Fix entry for AMQP
Andriy Gelman [Thu, 19 Mar 2020 11:57:31 +0000 (07:57 -0400)]
doc/general: Fix entry for AMQP

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agoavutil/hwcontext_cuda: combine transfer functions
Timo Rothenpieler [Thu, 19 Mar 2020 16:35:59 +0000 (17:35 +0100)]
avutil/hwcontext_cuda: combine transfer functions

Gets rid of some mostly duplicated code and adds the ability to do
hardware to hardware transfers.

3 months agoavformat/yuv4mpegdec: add support for 444alpha
Paul B Mahol [Thu, 19 Mar 2020 10:11:24 +0000 (11:11 +0100)]
avformat/yuv4mpegdec: add support for 444alpha

3 months agoavformat/yuv4mpegdec: use proper error codes
Paul B Mahol [Thu, 19 Mar 2020 10:08:42 +0000 (11:08 +0100)]
avformat/yuv4mpegdec: use proper error codes

3 months agoavutil/hwcontext_cuda: add YUVA420P pixel format
Yaroslav Pogrebnyak [Thu, 19 Mar 2020 12:08:20 +0000 (13:08 +0100)]
avutil/hwcontext_cuda: add YUVA420P pixel format

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
3 months agoavformat/xwma: return always proper error codes
Paul B Mahol [Thu, 19 Mar 2020 09:58:07 +0000 (10:58 +0100)]
avformat/xwma: return always proper error codes

3 months agolavfi/vf_dnn_processing: Fix compile warning of mixed declarations and code
Linjie Fu [Wed, 18 Mar 2020 04:23:10 +0000 (12:23 +0800)]
lavfi/vf_dnn_processing: Fix compile warning of mixed declarations and code

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
3 months agoMAINTAINERS: Don't mention Google+
Andreas Rheinhardt [Tue, 17 Mar 2020 22:56:20 +0000 (23:56 +0100)]
MAINTAINERS: Don't mention Google+

It has been shut down in April 2019.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoMAINTAINERS: Add myself as maintainer for matroska*
Andreas Rheinhardt [Tue, 17 Mar 2020 22:56:19 +0000 (23:56 +0100)]
MAINTAINERS: Add myself as maintainer for matroska*

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/nsvdec: Fix memleaks on errors while reading the header
Michael Niedermayer [Wed, 18 Mar 2020 19:20:44 +0000 (20:20 +0100)]
avformat/nsvdec: Fix memleaks on errors while reading the header

Fixes: memleaks
Fixes: 21084/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5655975492321280

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>
3 months agoavcodec/siren: Fix integer overflow in get_dw()
Michael Niedermayer [Wed, 18 Mar 2020 19:20:43 +0000 (20:20 +0100)]
avcodec/siren: Fix integer overflow in get_dw()

Fixes: signed integer overflow: 685813396 + 1803454769 cannot be represented in type 'int'
Fixes: 21073/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SIREN_fuzzer-5744900508483584

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>
3 months agoavcodec/ffwavesynth: Fix integer overflow in computation of ddphi
Michael Niedermayer [Sun, 15 Mar 2020 17:25:56 +0000 (18:25 +0100)]
avcodec/ffwavesynth: Fix integer overflow in computation of ddphi

Fixes: signed integer overflow: 1302123111085380114 - -8319005078741256972 cannot be represented in type 'long'
Fixes: 20991/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5148554161291264

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoMAINTAINERS: add myself and my gpg key
Lynne [Tue, 17 Mar 2020 22:56:03 +0000 (22:56 +0000)]
MAINTAINERS: add myself and my gpg key

3 months agoavcodec/avcodec: Fix typos
Andriy Gelman [Thu, 5 Mar 2020 05:02:27 +0000 (00:02 -0500)]
avcodec/avcodec: Fix typos

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoscale_vulkan: add support for RGB->YUV conversions
Lynne [Sun, 15 Mar 2020 10:30:34 +0000 (10:30 +0000)]
scale_vulkan: add support for RGB->YUV conversions

Only top-left chroma position supported for now.

3 months agohwcontext_vulkan: fix imported image bitmask
Lynne [Tue, 17 Mar 2020 13:08:06 +0000 (13:08 +0000)]
hwcontext_vulkan: fix imported image bitmask

3 months agoremove CHAR_MIN/CHAR_MAX usage
Paul B Mahol [Tue, 17 Mar 2020 21:46:36 +0000 (22:46 +0100)]
remove CHAR_MIN/CHAR_MAX usage

It is not needed at all.

3 months agodoc/general: remove dupe entry and fix section
Paul B Mahol [Tue, 17 Mar 2020 19:06:11 +0000 (20:06 +0100)]
doc/general: remove dupe entry and fix section

3 months agodoc/general: mention more DPCM codecs
Paul B Mahol [Tue, 17 Mar 2020 18:52:46 +0000 (19:52 +0100)]
doc/general: mention more DPCM codecs

3 months agodoc/general: move apdcm zork to right place
Paul B Mahol [Tue, 17 Mar 2020 15:36:54 +0000 (16:36 +0100)]
doc/general: move apdcm zork to right place

3 months agodoc/general: mention some added CRI stuff
Paul B Mahol [Tue, 17 Mar 2020 15:32:00 +0000 (16:32 +0100)]
doc/general: mention some added CRI stuff

3 months agoavformat: add hca demuxer
Paul B Mahol [Sun, 15 Mar 2020 12:55:15 +0000 (13:55 +0100)]
avformat: add hca demuxer

3 months agoavcodec: add CRI HCA decoder
Paul B Mahol [Sun, 15 Mar 2020 12:28:13 +0000 (13:28 +0100)]
avcodec: add CRI HCA decoder

3 months agoavcodec/allcodecs: move sdx2 to correct place
Paul B Mahol [Sun, 15 Mar 2020 10:37:02 +0000 (11:37 +0100)]
avcodec/allcodecs: move sdx2 to correct place

3 months agoavformat: add derf demuxer
Paul B Mahol [Sun, 15 Mar 2020 09:47:29 +0000 (10:47 +0100)]
avformat: add derf demuxer

3 months agoavcodec: add derf dpcm decoder
Paul B Mahol [Sun, 15 Mar 2020 10:03:27 +0000 (11:03 +0100)]
avcodec: add derf dpcm decoder

3 months agoavformat: add fwse demuxer
Paul B Mahol [Sat, 14 Mar 2020 10:37:40 +0000 (11:37 +0100)]
avformat: add fwse demuxer

3 months agoavcodec: add ADPCM IMA MTF decoder
Paul B Mahol [Sat, 14 Mar 2020 10:55:58 +0000 (11:55 +0100)]
avcodec: add ADPCM IMA MTF decoder

3 months agofate/ffmpeg: add test for time limited sub2video instance
Jan Ekström [Wed, 11 Mar 2020 23:22:15 +0000 (01:22 +0200)]
fate/ffmpeg: add test for time limited sub2video instance

Utilizes a subpicture sample with one decodable subpicture for the
test.

Based on a failing test case in reported by Michael in
https://ffmpeg.org/pipermail/ffmpeg-devel/2019-February/240398.html
which at the time had no test case for it.

Additionally, this is the first test case for the presentation
graphics format.

3 months agofate/ffmpeg: add a second, simple sub2video test
Jan Ekström [Wed, 11 Mar 2020 22:38:33 +0000 (00:38 +0200)]
fate/ffmpeg: add a second, simple sub2video test

3 months agoffmpeg: explicitly handle sub2video subpicture initialization
Jan Ekström [Fri, 22 Feb 2019 23:48:08 +0000 (01:48 +0200)]
ffmpeg: explicitly handle sub2video subpicture initialization

Each time the sub2video structure is initialized, the sub2video
subpicture is initialized together with the first received heartbeat.
The heartbeat's PTS is utilized as the subpicture start time.

Additionally, add some documentation on the stages.

3 months agolavd/avfoundation: Add basic transport control observation for capable devices.
Thilo Borgmann [Thu, 5 Mar 2020 11:32:49 +0000 (12:32 +0100)]
lavd/avfoundation: Add basic transport control observation for capable devices.

3 months agoh264dec: do not return a value from init_dimensions()
Anton Khirnov [Mon, 17 Apr 2017 08:40:55 +0000 (10:40 +0200)]
h264dec: do not return a value from init_dimensions()

There are no failure cases left in this function.

3 months agovp3: eliminate copy_fields
Anton Khirnov [Mon, 11 Apr 2016 07:27:08 +0000 (09:27 +0200)]
vp3: eliminate copy_fields

It is very fragile against fields being moved and hides what is actually
being copied. Copy all the fields explicitly instead.

3 months agoexamples/avio_dir_cmd: drop support for move/delete operations
Anton Khirnov [Fri, 10 Jan 2020 11:10:09 +0000 (12:10 +0100)]
examples/avio_dir_cmd: drop support for move/delete operations

They use non-public functions, which is unacceptable for a public API
example. Rename the example back to avio_list_dir.

This effectively reverts c84d208c275d6a43b3c3421d38772179abf8acee and
767d780ec001167b2fd8f6cfe4ef78a3a8b1e34c.

3 months agompegvideo: drop an unnecessary function parameter
Anton Khirnov [Tue, 10 Mar 2020 13:14:14 +0000 (14:14 +0100)]
mpegvideo: drop an unnecessary function parameter

It is always 0.

3 months agompegvideodata: drop useless comments
Anton Khirnov [Mon, 9 Mar 2020 13:11:29 +0000 (14:11 +0100)]
mpegvideodata: drop useless comments

3 months agoavformat/webmdashenc: Remove write_trailer
Andreas Rheinhardt [Thu, 26 Dec 2019 10:53:32 +0000 (11:53 +0100)]
avformat/webmdashenc: Remove write_trailer

It doesn't do anything: All allocated blocks have already been freed in
write_header.

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>
3 months agoavformat/mxfenc: allow all frame rates if -strict mode is set to unofficial or lower
Marton Balint [Thu, 5 Mar 2020 20:36:20 +0000 (21:36 +0100)]
avformat/mxfenc: allow all frame rates if -strict mode is set to unofficial or lower

There was no consensus wheter or not to allow unofficial frame rates due to
possible interoperability issues, a compromise is to only allow it if -strict
mode is set to unofficial.

Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agoavformat/mxfenc: factorize timecode checking and setting
Marton Balint [Tue, 3 Mar 2020 22:13:07 +0000 (23:13 +0100)]
avformat/mxfenc: factorize timecode checking and setting

Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agoavformat/mxfenc: add some missing content package rates
Marton Balint [Fri, 28 Feb 2020 00:29:51 +0000 (01:29 +0100)]
avformat/mxfenc: add some missing content package rates

Fixes ticket #8523.

Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agoavformat/mxfenc: move content package rates and timebase combinations to a separate...
Marton Balint [Fri, 28 Feb 2020 00:21:04 +0000 (01:21 +0100)]
avformat/mxfenc: move content package rates and timebase combinations to a separate struct

Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agoavformat/mxf: get rid of samples per frame array usage
Marton Balint [Fri, 28 Feb 2020 00:10:45 +0000 (01:10 +0100)]
avformat/mxf: get rid of samples per frame array usage

Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agoavformat/audiointerleave: disallow using a samples_per_frame array
Marton Balint [Thu, 27 Feb 2020 23:26:20 +0000 (00:26 +0100)]
avformat/audiointerleave: disallow using a samples_per_frame array

Only MXF used an actual sample array, and that is unneeded there because simple
rounding rules can be used instead.

Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agoavformat/smoothstreaming: Fix memleaks on errors
Andreas Rheinhardt [Thu, 26 Dec 2019 10:53:28 +0000 (11:53 +0100)]
avformat/smoothstreaming: Fix memleaks on errors

If an AVFormatContext could be allocated, but white-/blacklists couldn't
be copied, the AVFormatContext would leak as it was only accessible
through a local variable that goes out of scope when one goes to fail.

Furthermore, in case writing a header of a submuxer failed, the options
used for said call could leak.

Both of these memleaks have been fixed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/matroskaenc: Check BlockAdditional size before use
Andreas Rheinhardt [Sun, 26 Jan 2020 05:10:27 +0000 (06:10 +0100)]
avformat/matroskaenc: Check BlockAdditional size before use

Don't read a 64bit number before having checked that the data is at
least 8 bytes long.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/avienc: Use AV_STRINGIFY for compile time constant
Andreas Rheinhardt [Sat, 14 Mar 2020 17:08:45 +0000 (18:08 +0100)]
avformat/avienc: Use AV_STRINGIFY for compile time constant

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/nutenc: Drop redundant frees
Andreas Rheinhardt [Sat, 14 Mar 2020 16:32:17 +0000 (17:32 +0100)]
avformat/nutenc: Drop redundant frees

Should writing the header fail, the allocations already performed will
be freed during deinit so remove the frees in nut_write_header().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavfilter/af_anequalizer: fix off by one in reallocation
Paul B Mahol [Sat, 14 Mar 2020 18:39:04 +0000 (19:39 +0100)]
avfilter/af_anequalizer: fix off by one in reallocation

3 months agoavformat/mux: Unify setting number of muxed packets
Andreas Rheinhardt [Thu, 12 Mar 2020 17:54:08 +0000 (18:54 +0100)]
avformat/mux: Unify setting number of muxed packets

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/mux: Remove redundant checks for write errors
Andreas Rheinhardt [Thu, 12 Mar 2020 17:54:07 +0000 (18:54 +0100)]
avformat/mux: Remove redundant checks for write errors

If writing a packet didn't directly return an error, the AVIOContext's
error flag is checked for errors (if existing) by write_packet(). And if
write_packet() didn't indicate an error, its callers checked the error
flag of the AVIOContext (if existing). The latter check is redundant.

The reason for checking twice lies in the FFmpeg-Libav split: The check
in write_packet() has been added in 9ad1e0c1 in Libav. FFmpeg already
had the other checks (since aec9390a), but when 9ad1e0c1 was merged
(in 1f1c1008), no one noticed the redundant checks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>