]> git.sesse.net Git - ffmpeg/log
ffmpeg
4 years agoaf_resample: switch to child_class_iterate()
Anton Khirnov [Wed, 27 May 2020 13:34:07 +0000 (15:34 +0200)]
af_resample: switch to child_class_iterate()

4 years agoaf_aresample: switch to child_class_iterate()
Anton Khirnov [Wed, 27 May 2020 13:34:07 +0000 (15:34 +0200)]
af_aresample: switch to child_class_iterate()

4 years agoAVCodecContext: switch to child_class_iterate()
Anton Khirnov [Wed, 27 May 2020 13:34:07 +0000 (15:34 +0200)]
AVCodecContext: switch to child_class_iterate()

4 years agobsf: switch to child_class_iterate()
Anton Khirnov [Wed, 27 May 2020 13:34:07 +0000 (15:34 +0200)]
bsf: switch to child_class_iterate()

4 years agofftools: switch to the new child class iteration API
Anton Khirnov [Wed, 27 May 2020 13:25:38 +0000 (15:25 +0200)]
fftools: switch to the new child class iteration API

4 years agolavu/opt: add a more general child class iteration API
Anton Khirnov [Wed, 27 May 2020 13:21:30 +0000 (15:21 +0200)]
lavu/opt: add a more general child class iteration API

Use opaque iteration state instead of the previous child class. This
mirrors similar changes done in lavf/lavc.

Deprecate the av_opt_child_class_next() API.

4 years agolavf/dump: schedule use of deprecated API for removal
Anton Khirnov [Wed, 27 May 2020 12:38:44 +0000 (14:38 +0200)]
lavf/dump: schedule use of deprecated API for removal

4 years agoRemove unnecessary use of avcodec_close().
Anton Khirnov [Wed, 27 May 2020 07:30:46 +0000 (09:30 +0200)]
Remove unnecessary use of avcodec_close().

Replace it with avcodec_free_context() or drop it completely as
appropriate.

4 years agoavformat/hls: check segment duration value of EXTINF
Steven Liu [Fri, 29 May 2020 03:39:05 +0000 (11:39 +0800)]
avformat/hls: check segment duration value of EXTINF

fix ticket: 8673
set the default EXTINF duration to 1ms if duration is smaller than 1ms

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/hls: check output string is usable of ff_make_absolute_url
Steven Liu [Thu, 28 May 2020 02:41:26 +0000 (10:41 +0800)]
avformat/hls: check output string is usable of ff_make_absolute_url

fix ticket: 8688
should goto failed workflow if cannot get usable string by ff_make_absolute_url

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/url: check return value of strchr
Steven Liu [Thu, 28 May 2020 02:41:25 +0000 (10:41 +0800)]
avformat/url: check return value of strchr

fix ticket: 8687
workflow should return if there have no value of strchr

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoRELEASE: We are after the 4.3 branch point, update for that
Michael Niedermayer [Mon, 8 Jun 2020 21:18:27 +0000 (23:18 +0200)]
RELEASE: We are after the 4.3 branch point, update for that

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/snow: ensure current_picture is writable before modifying its data
James Almer [Fri, 29 May 2020 16:59:12 +0000 (13:59 -0300)]
avcodec/snow: ensure current_picture is writable before modifying its data

current_picture was not writable here because a reference existed in
at least avctx->coded_frame, and potentially elsewhere if the caller
created new ones from it.

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agodoc/utils: document the "s", "ms" and "us" suffixes for durations
Moritz Barsnick [Mon, 8 Jun 2020 15:39:00 +0000 (17:39 +0200)]
doc/utils: document the "s", "ms" and "us" suffixes for durations

These suffixes were introduced in 61c972384d311508d07f9360d196909e27195655
and completed in 8218249f1f04de65904f58519bde21948e5a0783.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
4 years agodoc/ffmpeg: remove reference to deprecated option
Moritz Barsnick [Mon, 8 Jun 2020 15:09:53 +0000 (17:09 +0200)]
doc/ffmpeg: remove reference to deprecated option

The "-deinterlace" was deprecated since d7edd35, over eight years
ago.

Refer to deinterlacing filters instead.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
4 years agopthread_frame: change the way delay is set
Anton Khirnov [Thu, 4 Jun 2020 10:01:51 +0000 (12:01 +0200)]
pthread_frame: change the way delay is set

It is a constant known at codec init, so set it in
ff_frame_thread_init(). Also, only set it for video, since the meaning
of this field is not well-defined for audio with frame threading.

Fixes availability of delay in callbacks invoked from the per-thread
contexts after 1f4cf92cfbd3accbae582ac63126ed5570ddfd37.

4 years agoavformat/mpegts: add constants for MPEG-TS transport stream identifiers
Brad Hards [Mon, 8 Jun 2020 23:01:24 +0000 (01:01 +0200)]
avformat/mpegts: add constants for MPEG-TS transport stream identifiers

Signed-off-by: Brad Hards <bradh@frogmouth.net>
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/fifo: add timeshift option to delay output
Marton Balint [Thu, 7 May 2020 19:49:47 +0000 (21:49 +0200)]
avformat/fifo: add timeshift option to delay output

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoChangelog: add next marker back after branching 4.3
Michael Niedermayer [Mon, 8 Jun 2020 20:43:41 +0000 (22:43 +0200)]
Changelog: add next marker back after branching 4.3

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoBump minor versions after branching 4.3
Michael Niedermayer [Mon, 8 Jun 2020 20:45:49 +0000 (22:45 +0200)]
Bump minor versions after branching 4.3

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoBump minor versions to separate 4.3 from master
Michael Niedermayer [Mon, 8 Jun 2020 20:45:49 +0000 (22:45 +0200)]
Bump minor versions to separate 4.3 from master

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoChangelog: Add 4.3 cut marker
Michael Niedermayer [Mon, 8 Jun 2020 20:43:10 +0000 (22:43 +0200)]
Changelog: Add 4.3 cut marker

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agodoc/APIchanges: Fill in missing values
Michael Niedermayer [Mon, 8 Jun 2020 20:33:42 +0000 (22:33 +0200)]
doc/APIchanges: Fill in missing values

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoRevert "lavf/mp3dec: don't adjust start time; packets are not adjusted."
Michael Niedermayer [Mon, 8 Jun 2020 20:08:37 +0000 (22:08 +0200)]
Revert "lavf/mp3dec: don't adjust start time; packets are not adjusted."

This causes regressions in end to end timestamps with mp3s and ffmpeg.
The revert is to avoid this regression in the 4.3 release

See: [FFmpeg-devel] [PATCH] Don't adjust start time for MP3 files; packets are not adjusted.

This reverts commit 460132c9980f8a1f501a1f69477bca49e1641233.

4 years agoavcodec/mpeg12dec: Fix got_output
Michael Niedermayer [Wed, 27 May 2020 22:19:56 +0000 (00:19 +0200)]
avcodec/mpeg12dec: Fix got_output

This makes got_output consistent with the code in slice_end() which sets the output

in slice_end()
 if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
     int ret = av_frame_ref(pict, s->current_picture_ptr->f);
     ...
 } else {

Fixes: assertion failure
Fixes: 22178/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG1VIDEO_fuzzer-5664234440753152
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 agotools/target_dec_fuzzer: enable mjpeg for tiff or tdsc
Michael Niedermayer [Fri, 7 Feb 2020 12:59:15 +0000 (13:59 +0100)]
tools/target_dec_fuzzer: enable mjpeg for tiff or tdsc

This is needed for fuzzing tiff/tdsc and should increase coverage

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/hcadec: Check or bound indexes
Michael Niedermayer [Wed, 13 May 2020 17:54:42 +0000 (19:54 +0200)]
avcodec/hcadec: Check or bound indexes

This causes indexes into scale_conversion_table to wrap around, alternatively they
could be clipped, the table be enlarged or we can error out. I have not found a document that specifies
what is the correct way to handle this

Fixes: out of array access
Fixes: 21727/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCA_fuzzer-5752477891952640.fuzz
Fixes: 22438/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCA_fuzzer-5640717790871552
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/pnm: Check scale
Michael Niedermayer [Sat, 6 Jun 2020 15:50:21 +0000 (17:50 +0200)]
avcodec/pnm: Check scale

Fixes: division by zero
Fixes: 22974/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PFM_fuzzer-6270027077779456
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 agotools/target_dem_fuzzer: Implement AVSEEK_SIZE
Michael Niedermayer [Sun, 7 Jun 2020 23:03:17 +0000 (01:03 +0200)]
tools/target_dem_fuzzer: Implement AVSEEK_SIZE

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/4xm: Cleanup on GET_LIST_HEADER() failure
Michael Niedermayer [Sun, 7 Jun 2020 19:35:43 +0000 (21:35 +0200)]
avformat/4xm: Cleanup on GET_LIST_HEADER() failure

Fixes: memleak
Fixes: 23142/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5932860820422656
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agohevc: move SliceHeader and LongTermRPS back to hevcdec.h
Anton Khirnov [Mon, 1 Jun 2020 09:25:38 +0000 (11:25 +0200)]
hevc: move SliceHeader and LongTermRPS back to hevcdec.h

They are no longer necessary there and have nothing to do with parameter
sets, so do not belong in hevc_ps.h.

This effectively reverts 4aaace8b25.

4 years agohevc_parser: drop the use of SliceHeader
Anton Khirnov [Wed, 27 May 2020 09:01:12 +0000 (11:01 +0200)]
hevc_parser: drop the use of SliceHeader

It is only used to store a few local variables within one function,
which is better accomplished by just declaring them on stack explicitly.

4 years agohevc_refs: reduce code duplication in find_ref_idx()
Anton Khirnov [Wed, 27 May 2020 08:46:50 +0000 (10:46 +0200)]
hevc_refs: reduce code duplication in find_ref_idx()

4 years agoavcodec/v4l2_m2m_enc: Avoid ;;
Andreas Rheinhardt [Mon, 1 Jun 2020 09:51:40 +0000 (11:51 +0200)]
avcodec/v4l2_m2m_enc: Avoid ;;

Inside a function, the second ; in a double ;; is a null statement, but
outside of functions a double ;; is simply invalid C that compilers
happen to accept. v4l2_m2m_enc.c contained several ;; as a result of
macro-expansion. So change the underlying macro so that it doesn't
happen any longer.

This fixes warnings when compiling with -pedantic: "ISO C does not allow
extra ‘;’ outside of a function".

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years agoavcodec/ac3dec_fixed: Remove some temporary variables from scale_coefs()
Michael Niedermayer [Sat, 1 Feb 2020 23:07:19 +0000 (00:07 +0100)]
avcodec/ac3dec_fixed: Remove some temporary variables from scale_coefs()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/lzf: Consider the needed size in reallocation
Michael Niedermayer [Thu, 28 May 2020 16:08:57 +0000 (18:08 +0200)]
avcodec/lzf: Consider the needed size in reallocation

Fixes: NULL pointer dereference
Fixes: 22381/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NOTCHLC_fuzzer-5659879921680384.fuzz
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 agoavformat/mlvdec: fail reading a packet with 0 streams
Michael Niedermayer [Sun, 31 May 2020 12:30:43 +0000 (14:30 +0200)]
avformat/mlvdec: fail reading a packet with 0 streams

Fixes: NULL pointer dereference
Fixes: 22604/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5667739074297856.fuzz
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 agoavformat/thp: Check compcount
Michael Niedermayer [Sun, 31 May 2020 12:24:04 +0000 (14:24 +0200)]
avformat/thp: Check compcount

Fixes: out of array access
Fixes: 22520/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5100297658826752
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/adpcm: XA: Check shift similar to filter
Michael Niedermayer [Sun, 31 May 2020 12:59:02 +0000 (14:59 +0200)]
avcodec/adpcm: XA: Check shift similar to filter

Fixes: negative shift
Fixes: 22499/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_XA_fuzzer-5765452130418688
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 agoavfilter/vf_vaguedenoiser: add new type of threshold
Paul B Mahol [Sun, 7 Jun 2020 13:10:03 +0000 (15:10 +0200)]
avfilter/vf_vaguedenoiser: add new type of threshold

4 years agoavfilter/vf_vaguedenoiser: remove excessive code from soft thresholding
Paul B Mahol [Sun, 7 Jun 2020 11:12:34 +0000 (13:12 +0200)]
avfilter/vf_vaguedenoiser: remove excessive code from soft thresholding

4 years agolibavcodec/jpeg2000_parser: Add jpeg2000 parser
Gautam Ramakrishnan [Sat, 6 Jun 2020 06:12:17 +0000 (11:42 +0530)]
libavcodec/jpeg2000_parser: Add jpeg2000 parser

I have attempted to write a JPEG2000 Parser. Have tested
by generating a file containing 14 frames, as mentioned
by Micheal. Have also tried testing with various packet
sizes by setting -frame_size option. Additionally,
fixed a few formatting issues as pointed out by Micheal.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/oggdec: Do not hardcode arbitrary and sometimes unavailable size
Michael Niedermayer [Sat, 6 Jun 2020 17:30:30 +0000 (19:30 +0200)]
avformat/oggdec: Do not hardcode arbitrary and sometimes unavailable size

Fixes: regression since e983197cbc93420b67aa7e811be47d7278c2c8a2
Fixes: out of array read
Fixes: 22185/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5662069073641472
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/oggdec: Initialize return value from ogg_read_page() and check it everywhere
Michael Niedermayer [Sat, 6 Jun 2020 17:14:04 +0000 (19:14 +0200)]
avformat/oggdec: Initialize return value from ogg_read_page() and check it everywhere

Fixes regression since 9ad47762c17d2c6d06595aa17b88112baa91b72c
Fixes: out of array access
Fixes: 22172/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5658535590625280
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/avf_showspectrum: properly handle EOF case
Paul B Mahol [Sat, 6 Jun 2020 17:07:35 +0000 (19:07 +0200)]
avfilter/avf_showspectrum: properly handle EOF case

4 years agoavfilter/asrc_anoisesrc: switch to activate
Paul B Mahol [Sat, 6 Jun 2020 13:49:13 +0000 (15:49 +0200)]
avfilter/asrc_anoisesrc: switch to activate

Allows to set EOF timestamp.

4 years agoavcodec/libaomenc: remove the experimental flag when using libaom 2.0.0 or newer
James Almer [Wed, 27 May 2020 01:27:42 +0000 (22:27 -0300)]
avcodec/libaomenc: remove the experimental flag when using libaom 2.0.0 or newer

Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavutil/dict: av_realloc -> av_realloc_array()
Limin Wang [Mon, 25 May 2020 15:21:27 +0000 (23:21 +0800)]
avutil/dict: av_realloc -> av_realloc_array()

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years agoavcodec/huffyuvdec: Test vertical coordinate more often
Michael Niedermayer [Fri, 5 Jun 2020 20:05:27 +0000 (22:05 +0200)]
avcodec/huffyuvdec: Test vertical coordinate more often

Fixes: out of array access
Fixes: 22892/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HYMT_fuzzer-5135996772679680.fuzz
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 agoavutil/mathematics: Fix overflow with NaN in av_add_stable()
Dale Curtis [Thu, 14 May 2020 21:47:49 +0000 (14:47 -0700)]
avutil/mathematics: Fix overflow with NaN in av_add_stable()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat: Fix overflow in compute_pkt_fields().
Dale Curtis [Thu, 14 May 2020 21:47:49 +0000 (14:47 -0700)]
avformat: Fix overflow in compute_pkt_fields().

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/rawdec: fix identifier names
Michael Niedermayer [Wed, 3 Jun 2020 19:00:01 +0000 (21:00 +0200)]
avformat/rawdec: fix identifier names

Fixes: out of array access
Fixes: 22686/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5121369624018944
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>
4 years agolibavcodec/bmp_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.
Thierry Foucu [Thu, 4 Jun 2020 20:03:27 +0000 (13:03 -0700)]
libavcodec/bmp_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.

the target_dec_fuzzer is checking for the avpkt.data pointer but if the
bmp parser cannot combine the frame, the poutbuf is not set.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolibavcodec/mlp_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.
Thierry Foucu [Thu, 4 Jun 2020 20:03:15 +0000 (13:03 -0700)]
libavcodec/mlp_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.

the target_dec_fuzzer is checking for the avpkt.data pointer but if the
mlp parser cannot combine the frame, the poutbuf is not set.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolibavcodec/png_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.
Thierry Foucu [Thu, 4 Jun 2020 20:03:00 +0000 (13:03 -0700)]
libavcodec/png_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.

the target_dec_fuzzer is checking for the avpkt.data pointer but if the
png parser cannot combine the frame, the poutbuf is not set.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/hq_hqa: Check info size
Michael Niedermayer [Fri, 29 May 2020 22:43:46 +0000 (00:43 +0200)]
avcodec/hq_hqa: Check info size

Fixes: assertion failure
Fixes: 21079/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-5737046523248640
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 agoavutil/buffer: separate public and internal flags inside AVBuffers
James Almer [Mon, 1 Jun 2020 14:22:01 +0000 (11:22 -0300)]
avutil/buffer: separate public and internal flags inside AVBuffers

It's better to not mix user provided flags and internal flags set by
AVBufferRef helper functions.

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavutil/buffer: avutil/buffer: add a mention that some arguments from av_buffer_pool_i...
James Almer [Mon, 1 Jun 2020 13:31:30 +0000 (10:31 -0300)]
avutil/buffer: avutil/buffer: add a mention that some arguments from av_buffer_pool_init2() may be NULL

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavutil/buffer: use the default allocator if none is provided to av_buffer_pool_init2()
James Almer [Mon, 1 Jun 2020 13:25:09 +0000 (10:25 -0300)]
avutil/buffer: use the default allocator if none is provided to av_buffer_pool_init2()

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec/mv30: Fix multiple integer overflows in idct_1d()
Michael Niedermayer [Sat, 23 May 2020 19:52:25 +0000 (21:52 +0200)]
avcodec/mv30: Fix multiple integer overflows in idct_1d()

Fixes: signed integer overflow: -4869937 * 473 cannot be represented in type 'int'
Fixes: 21934/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MV30_fuzzer-5667289925156864
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/mv30: Do not allow MVs outside the allocated image
Michael Niedermayer [Wed, 20 May 2020 19:52:23 +0000 (21:52 +0200)]
avcodec/mv30: Do not allow MVs outside the allocated image

Fixes: out of array read
Fixes: 21804/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MV30_fuzzer-5673678898724864
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 in mclms_predict()
Michael Niedermayer [Sat, 23 May 2020 20:02:56 +0000 (22:02 +0200)]
avcodec/wmalosslessdec: Fix integer overflow in mclms_predict()

Fixes: signed integer overflow: 2147483636 + 2048 cannot be represented in type 'int'
Fixes: 22016/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5109395618004992
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/vp9dsp_template: Fix integer overflow(s) in iadst16_1d()
Michael Niedermayer [Sat, 23 May 2020 22:24:40 +0000 (00:24 +0200)]
avcodec/vp9dsp_template: Fix integer overflow(s) in iadst16_1d()

Fixes: signed integer overflow: 1080285923 - -1130879337 cannot be represented in type 'int'
Fixes: 22002/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-6260237310099456
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/wavpack: Do not allow the sample format to change between channels
Michael Niedermayer [Wed, 3 Jun 2020 19:13:47 +0000 (21:13 +0200)]
avcodec/wavpack: Do not allow the sample format to change between channels

Fixes: out of array access
Fixes: 22692/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVPACK_fuzzer-5678686190960640
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: David Bryant <david@wavpack.com>
Tested-by: David Bryant <david@wavpack.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/bitpacked: add missing comma to codec tags
Michael Niedermayer [Wed, 3 Jun 2020 17:17:34 +0000 (19:17 +0200)]
avcodec/bitpacked: add missing comma to codec tags

Fixes: array end overread
Fixes: 22395/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BITPACKED_fuzzer-5760940300828672
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Darnley <james.darnley@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/utils: Find a fallback probe decoder that will also match a forced decoder...
Samuel Foss [Wed, 3 Jun 2020 11:15:28 +0000 (07:15 -0400)]
avformat/utils: Find a fallback probe decoder that will also match a forced decoder's codec.

Prevent codecpar->codec_id from getting out of sync with the codec instantiated for probing.

Signed-off-by: Samuel Foss <sfoss@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/nvenc: honor max bitrate in CQ mode
Roman Arzumanyan [Wed, 3 Jun 2020 13:12:12 +0000 (16:12 +0300)]
avcodec/nvenc: honor max bitrate in CQ mode

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
4 years agohwcontext_vulkan: fix make checkheaders fail
Jun Zhao [Sat, 30 May 2020 12:41:31 +0000 (20:41 +0800)]
hwcontext_vulkan: fix make checkheaders fail

make checkheaders will get error as follow:
CC libavutil/hwcontext_vulkan.h.o
In file included from libavutil/hwcontext_vulkan.h.c:1:
./libavutil/hwcontext_vulkan.h:130:23: error: ‘AV_NUM_DATA_POINTERS’ undeclared here (not in a function)
  130 |     void *alloc_pnext[AV_NUM_DATA_POINTERS];
      |                       ^~~~~~~~~~~~~~~~~~~~
./libavutil/hwcontext_vulkan.h:199:43: warning: ‘enum AVPixelFormat’ declared inside parameter list will not be visible outside of this definition or declaration

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
4 years agoavcodec/decode: actually propagate AVHWAccel.alloc_frame() return value
James Almer [Fri, 29 May 2020 18:07:41 +0000 (15:07 -0300)]
avcodec/decode: actually propagate AVHWAccel.alloc_frame() return value

Finishes fixing the regression introduced in a1133db30ef07896afd96f067e5c51531a4e85ab
after the partial fix in b6d6597bef66531ec07c07a7125b88aee38fb220.

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agofate/vcodec: use the encoder private option for frame skip compare function
James Almer [Wed, 27 May 2020 14:00:54 +0000 (11:00 -0300)]
fate/vcodec: use the encoder private option for frame skip compare function

Stop using the deprecated global option

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agolavf/tee: pass options to protocol.
Nicolas George [Tue, 2 Jun 2020 18:55:30 +0000 (20:55 +0200)]
lavf/tee: pass options to protocol.

Fix trac ticket #8705.

4 years agodnn/native: fix typo for definition of DOT_INTERMEDIATE
Wu Zhiwen [Mon, 1 Jun 2020 01:00:45 +0000 (09:00 +0800)]
dnn/native: fix typo for definition of DOT_INTERMEDIATE

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
4 years agoavcodec/ratecontrol: fix the integer overflow after long time run
Limin Wang [Sat, 30 May 2020 14:28:22 +0000 (22:28 +0800)]
avcodec/ratecontrol: fix the integer overflow after long time run

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years agoavcodec/internal: move packet related functions to their own header
James Almer [Tue, 2 Jun 2020 21:38:33 +0000 (18:38 -0300)]
avcodec/internal: move packet related functions to their own header

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/prompeg: av_dict_set() -> av_dict_set_int()
Limin Wang [Mon, 25 May 2020 12:19:28 +0000 (20:19 +0800)]
avformat/prompeg: av_dict_set() -> av_dict_set_int()

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years agoavformat/rtpproto: av_dict_set() -> av_dict_set_int()
Limin Wang [Mon, 25 May 2020 12:19:09 +0000 (20:19 +0800)]
avformat/rtpproto: av_dict_set() -> av_dict_set_int()

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years agoavformat/rtspdec: av_dict_set() -> av_dict_set_int()
Limin Wang [Mon, 25 May 2020 12:18:49 +0000 (20:18 +0800)]
avformat/rtspdec: av_dict_set() -> av_dict_set_int()

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years agocompat/cuda/ptx2c: remove shell loop; fix BSD sed compat
rcombs [Thu, 22 Aug 2019 05:40:47 +0000 (00:40 -0500)]
compat/cuda/ptx2c: remove shell loop; fix BSD sed compat

This fixes building on macOS, and improves build times dramatically there

4 years agoavcodec/h264dec: Disable forced small_padding on flag2 fast
Michael Niedermayer [Thu, 28 May 2020 12:33:58 +0000 (14:33 +0200)]
avcodec/h264dec: Disable forced small_padding on flag2 fast

Fixes: 20978/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5746381832847360
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/jpeg2000dec: clear pointer which become stale in get_ppt()
Michael Niedermayer [Sun, 31 May 2020 10:49:50 +0000 (12:49 +0200)]
avcodec/jpeg2000dec: clear pointer which become stale in get_ppt()

Fixes: use after free
Fixes: 22484/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5671488765296640
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Gautam Ramakrishnan <gautamramk@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agofate: add adpcm_ima_ssi encoding test
Zane van Iperen [Sun, 31 May 2020 05:24:11 +0000 (05:24 +0000)]
fate: add adpcm_ima_ssi encoding test

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agofftools/ffmpeg: update text requesting samples
Andriy Gelman [Sun, 10 May 2020 19:01:35 +0000 (15:01 -0400)]
fftools/ffmpeg: update text requesting samples

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Reviewed-by: Marton Balint <cus@passwd.hu>
4 years agoavcodec/nvenc: zero avg and max bitrate in CQ mode
Roman Arzumanyan [Mon, 20 Apr 2020 10:53:36 +0000 (13:53 +0300)]
avcodec/nvenc: zero avg and max bitrate in CQ mode

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
4 years agocheckasm: sw_rgb: Fix mixed declaration and code
Jun Zhao [Sat, 30 May 2020 12:33:53 +0000 (20:33 +0800)]
checkasm: sw_rgb: Fix mixed declaration and code

Fix mixed declaration and code.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
4 years agoavformat/dashenc: use AVStream timebase when computing missing bitrate
Przemysław Sobala [Wed, 27 May 2020 15:07:22 +0000 (17:07 +0200)]
avformat/dashenc: use AVStream timebase when computing missing bitrate

4 years agoavfilter/vf_lut3d: Fix mixed declaration and code
Andreas Rheinhardt [Mon, 1 Jun 2020 11:15:21 +0000 (13:15 +0200)]
avfilter/vf_lut3d: Fix mixed declaration and code

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years agoavcodec/encode: Remove ff_alloc_packet
Andreas Rheinhardt [Mon, 1 Jun 2020 09:44:00 +0000 (11:44 +0200)]
avcodec/encode: Remove ff_alloc_packet

It is no longer used anymore.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years agoavcodec/mpeg12enc: support mpeg2 encoder const profile
Limin Wang [Sat, 30 May 2020 13:25:32 +0000 (21:25 +0800)]
avcodec/mpeg12enc: support mpeg2 encoder const profile

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years agoavformat/mpegtsenc: set stream_id correctly based on KLV profile selected
Brad Hards [Wed, 27 May 2020 10:02:00 +0000 (20:02 +1000)]
avformat/mpegtsenc: set stream_id correctly based on KLV profile selected

Previously we always set STREAM_TYPE_PRIVATE_DATA, and that remains
the default value.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavcodec: add constants for KLV pseudo-profile.
Brad Hards [Wed, 27 May 2020 10:01:59 +0000 (20:01 +1000)]
avcodec: add constants for KLV pseudo-profile.

There are two different ways KLV is used in MISB specs - sync and async.
The corresponding text (in ST1401) says:

ISO/IEC 13818-1 Table-34 defines a stream_type = 0x15 for “Metadata carried in PES packets,”
and Table 2-22 defines a stream_id = 0xFC for “metadata stream.”

and

In ISO/IEC 13818-1, Table-34 defines a stream_type = 0x06 for “PES packets containing private
data,” and Table 2-22 defines a stream_id = 0xBD for “private_stream_1.”

These constants allow us to distinguish the two cases, as codec profiles.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavcodec/anm: Don't unnecessarily use context variables
Andreas Rheinhardt [Sat, 30 May 2020 04:14:12 +0000 (06:14 +0200)]
avcodec/anm: Don't unnecessarily use context variables

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years agoavcodec/anm: Check extradata length before allocating frame
Andreas Rheinhardt [Sat, 30 May 2020 03:25:06 +0000 (05:25 +0200)]
avcodec/anm: Check extradata length before allocating frame

Then one doesn't need to free the frame in case the length turns out to
be insufficient.

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years agoavformat: add kvag muxer
Zane van Iperen [Fri, 29 May 2020 10:54:59 +0000 (10:54 +0000)]
avformat: add kvag muxer

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/vf_lut3d: prelut support for 3d cinespace luts
Mark Reid [Sun, 24 May 2020 02:04:51 +0000 (19:04 -0700)]
avfilter/vf_lut3d: prelut support for 3d cinespace luts

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/oggparsetheora: Don't update start time when lastpts is AV_NOPTS_VALUE.
Dale Curtis [Fri, 15 May 2020 19:37:02 +0000 (12:37 -0700)]
avformat/oggparsetheora: Don't update start time when lastpts is AV_NOPTS_VALUE.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/af_aiir: simplify polynomial evaluation
Paul B Mahol [Sat, 30 May 2020 15:55:32 +0000 (17:55 +0200)]
avfilter/af_aiir: simplify polynomial evaluation

4 years agoavfilter/af_aiir: use correct size when allocating in zp2tf
Paul B Mahol [Sat, 30 May 2020 08:55:28 +0000 (10:55 +0200)]
avfilter/af_aiir: use correct size when allocating in zp2tf

4 years agoavfilter: add dblur video filter
Paul B Mahol [Wed, 27 May 2020 10:03:02 +0000 (12:03 +0200)]
avfilter: add dblur video filter

4 years agoavcodec: add PFM image decoder
Paul B Mahol [Wed, 27 May 2020 14:42:24 +0000 (16:42 +0200)]
avcodec: add PFM image decoder

4 years agolavf/utils: fix start_time/duration dump if it is AV_NOPTS_VALUE
Jun Zhao [Tue, 26 May 2020 16:37:21 +0000 (00:37 +0800)]
lavf/utils: fix start_time/duration dump if it is AV_NOPTS_VALUE

e,g: the command:
ffprobe -show_format -i fate-suite/aac/foo.aac -loglevel 99 will
dump the trace message as follow when start_time is AV_NOPTS_VALUE
[aac @ 0x55bf8e1f3dc0] stream 0: start_time: -326791809695.818 duration: 2.174
[aac @ 0x55bf8e1f3dc0] format: start_time: -9223372036854.775 duration: 2.174 bitrate=120 kb/s

after this fix, will dump the start_time with "NOPTS".

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>