[FFmpeg-devel] [PATCH v2 1/5] avformat/chromaprint: Fix fp_format option

2019-10-05 Thread Andriy Gelman
From: Andriy Gelman The fp_format option was incorrectly declared, meaning that it could not be set on the cli (via recommended settings raw/compressed/base64). This is fixed in the commit. --- libavformat/chromaprint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[FFmpeg-devel] [PATCH v2 5/5] avformat/chromaprint: Avoid null pointer dereference

2019-10-05 Thread Andriy Gelman
From: Andriy Gelman As of commit 21b2442f in the chromaprint library, selecting "-algorithm 2" via the ffmpeg cli creates a null pointer dereference. This can be replicated by: ./ffmpeg -f lavfi -i sine=d=20,asetnsamples=n=1000 -f chromaprint -algorithm 2 - Until this issue is resolved, this

[FFmpeg-devel] [PATCH v2 3/5] avformat/chromaprint: Improve logging message

2019-10-05 Thread Andriy Gelman
From: Andriy Gelman Setting silence_threshold requires that -algorithm 3 option is also set. Add this to the logging message. --- libavformat/chromaprint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c index

[FFmpeg-devel] [PATCH v2 2/5] doc/formats: Update documentation for chromaprint

2019-10-05 Thread Andriy Gelman
From: Andriy Gelman Silence detection can only be set with the -algorithm 3 option, so update the documentation. --- doc/muxers.texi | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index b3da8bf12e..cad376aaeb 100644 ---

[FFmpeg-devel] [PATCH v2 4/5] avformat/chromaprint: Fix writing raw fingerprint

2019-10-05 Thread Andriy Gelman
From: Andriy Gelman The pointer fp after the call to chromaprint_get_raw_fingerpoint() points to an array of uint32_t whereas the current code assumed just a char stream. Thus when writing the raw fingerprint, the output would be truncated by a factor of 4. This is fixed in the commit. For

[FFmpeg-devel] [PATCH] avcodec/cinepakenc: Fix invalid shifts

2019-10-05 Thread Andreas Rheinhardt
Fixes: left shift of 1 by 31 places cannot be represented in type 'int'. Affected the FATE-tests vsynth1-cinepak, vsynth2-cinepak and vsynth_lena-cinepak. Also fixes ticket #8220. Signed-off-by: Andreas Rheinhardt --- I am resending this, because in the meantime ticket #8220 has been opened

[FFmpeg-devel] [PATCH 05/10] avcodec/flac_parser: Fix off-by-one error

2019-10-05 Thread Andreas Rheinhardt
The flac parser uses a fifo to buffer its data. Consequently, when searching for sync codes of flac packets, one needs to take care of the possibility of wraparound. This is done by using an optimized start code search that works on each of the continuous buffers separately and by explicitly

[FFmpeg-devel] [PATCH 08/10] avcodec/flac_parser: Don't modify size of the input buffer

2019-10-05 Thread Andreas Rheinhardt
When flushing, MAX_FRAME_HEADER_SIZE bytes (always zero) are supposed to be written to the fifo buffer in order to be able to check the rest of the buffer for frame headers. It was intended to write these by writing a small buffer of size MAX_FRAME_HEADER_SIZE to the buffer. But the way it was

[FFmpeg-devel] [PATCH 10/10] avcodec/flac_parser: Cosmetics

2019-10-05 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/flac_parser.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c index 7ff7683c2e..9280246af2 100644 --- a/libavcodec/flac_parser.c +++

[FFmpeg-devel] [PATCH 03/10] avcodec/flac_parser: Use native endianness when possible

2019-10-05 Thread Andreas Rheinhardt
FLAC sync codes contain a byte equal to 0xFF and so the function that searches for sync codes first searched for this byte. It did this by checking four bytes at once; these bytes have been read via AV_RB32, but the test works just as well with native endianness. Signed-off-by: Andreas Rheinhardt

[FFmpeg-devel] [PATCH 04/10] avcodec/flac_parser: Don't allocate array separately

2019-10-05 Thread Andreas Rheinhardt
The FLACHeaderMarker structure contained a pointer to an array of int; said array was always allocated and freed at the same time as its referencing FLACHeaderMarker; the pointer was never modified to point to a different array and each FLACHeaderMarker had its own unique array. Furthermore, all

[FFmpeg-devel] [PATCH 07/10] avcodec/flac_parser: Remove superfluous checks

2019-10-05 Thread Andreas Rheinhardt
For a parser, the input buffer is always != NULL: In case of flushing, the indicated size of the input buffer will be zero and the input buffer will point to a zeroed buffer of size 0 + AV_INPUT_BUFFER_PADDING. Therefore one does not need to check for whether said buffer is NULL or not.

[FFmpeg-devel] [PATCH 09/10] avcodec/flac_parser: Don't leave stale pointer in memory

2019-10-05 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/flac_parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c index 376ba2bcfc..7ff7683c2e 100644 --- a/libavcodec/flac_parser.c +++ b/libavcodec/flac_parser.c @@ -734,6 +734,7 @@ static void

[FFmpeg-devel] [PATCH 06/10] avcodec/flac_parser: Fix number of buffered headers

2019-10-05 Thread Andreas Rheinhardt
Only decrement the number of buffered headers if a header has actually been freed. Signed-off-by: Andreas Rheinhardt --- libavcodec/flac_parser.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c index 197f234e61..8c61f3a88c 100644 ---

[FFmpeg-devel] [PATCH 02/10] avformat/flac_picture: Avoid allocation of AVIOContext

2019-10-05 Thread Andreas Rheinhardt
Put an AVIOContext whose lifetime doesn't extend beyond the function where it is allocated on the stack instead of allocating and freeing it. Signed-off-by: Andreas Rheinhardt --- libavformat/flac_picture.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git

[FFmpeg-devel] [PATCH 01/10] avformat/mpjpegdec: Avoid allocation of AVIOContext

2019-10-05 Thread Andreas Rheinhardt
Put an AVIOContext whose lifetime doesn't extend beyond the function where it is allocated on the stack instead of allocating and freeing it. Signed-off-by: Andreas Rheinhardt --- libavformat/mpjpegdec.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git

[FFmpeg-devel] [PATCH v1] avformat/tee.c: steal bsf option before passing to fifo muxer

2019-10-05 Thread Jun Li
Fix #7620 In the case tee muxer with both "bsf" and "use_fifo" parameters wil trigger this bug. Tee muxer will first steal parameters (like "f", "select"...) and then "use_fifo" will try reading out remaining options and pass them to fifo as option "format_options". Current code miss the part of

Re: [FFmpeg-devel] [PATCH] avformat/matroskaenc: don't rescale mastering metadata values

2019-10-05 Thread James Almer
On 10/3/2019 8:52 PM, James Almer wrote: > The rescaling can be done at muxing/encoding time, for formats that require > it. > > Signed-off-by: James Almer > --- > libavformat/matroskadec.c | 33 ++--- > 1 file changed, 10 insertions(+), 23 deletions(-) > > diff

Re: [FFmpeg-devel] [PATCH 1/6] avcodec/h2645_parse: Use av_fast_realloc() for nals array

2019-10-05 Thread James Almer
On 10/5/2019 6:41 PM, Michael Niedermayer wrote: > Fixes: Timeout (17sec ->281ms) > Fixes: > 17833/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5638346914660352 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg >

[FFmpeg-devel] [PATCH 6/6] avcodec/takdec: Fix overflow with large sample rates

2019-10-05 Thread Michael Niedermayer
Fixes: signed integer overflow: 2147483647 + 511 cannot be represented in type 'int' Fixes: 17899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5719753322135552 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by:

[FFmpeg-devel] [PATCH 2/6] avcodec/apedec: Check error flag after entropy_decode*

2019-10-05 Thread Michael Niedermayer
Fixes: 17886/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5728165124636672 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/apedec.c | 4 1 file changed, 4 insertions(+)

[FFmpeg-devel] [PATCH 5/6] avcodec/hqx: Check the input data against the image size

2019-10-05 Thread Michael Niedermayer
Fixes: Timeout (22 -> 100 ms) Fixes: 15173/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQX_fuzzer-5662556846292992 Fixes: 17896/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQX_fuzzer-5679312077848576 Found-by: continuous fuzzing process

[FFmpeg-devel] [PATCH 4/6] avcodec/ralf: Skip initializing unused filter variables

2019-10-05 Thread Michael Niedermayer
Fixes: left shift of negative value -1 Fixes: 17890/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5643307467669504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/ralf.c | 6

[FFmpeg-devel] [PATCH 3/6] avcodec/apedec: Check remaining space in decode_array_0000()

2019-10-05 Thread Michael Niedermayer
Fixes: Timeout (? -> 2sec) Fixes: 17886/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5728165124636672 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/apedec.c | 4 1 file

[FFmpeg-devel] [PATCH 1/6] avcodec/h2645_parse: Use av_fast_realloc() for nals array

2019-10-05 Thread Michael Niedermayer
Fixes: Timeout (17sec ->281ms) Fixes: 17833/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5638346914660352 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/h2645_parse.c | 6

Re: [FFmpeg-devel] [PATCH] Change libvpxenc default to crf=32.

2019-10-05 Thread James Zern
On Tue, Sep 24, 2019 at 4:31 PM Elliott Karpilovsky wrote: > > Current default is 200kbps, which produces inconsistent > results (too high for low-res, too low for hi-res). Use > CRF instead, which will adapt. Affects VP9. Also have > VP8 use a default bitrate of 256kbps. > --- >

Re: [FFmpeg-devel] [PATCH V1 2/2] lavfi/hqdn3d: add slice thread optionmation

2019-10-05 Thread Moritz Barsnick
On Thu, Oct 03, 2019 at 09:53:16 +0800, Jun Zhao wrote: > From: Jun Zhao > Subject: [PATCH V1 2/2] lavfi/hqdn3d: add slice thread optionmation Nit: big typo in the first line of your commit message. Moritz ___ ffmpeg-devel mailing list

Re: [FFmpeg-devel] [PATCH V1 1/2] avutil/common: Fix underflow for ROUNDED_DIV with unsigned integer

2019-10-05 Thread Michael Niedermayer
On Thu, Oct 03, 2019 at 09:53:15AM +0800, Jun Zhao wrote: > From: Mengye Lv > > When used ROUNDED_DIV(a,b), if a is unsigned integer zero, it's > will lead to an underflow issue(it called unsigned integer > wrapping). > > Fixes #8062 > > Signed-off-by: Mengye Lv > Signed-off-by: Jun Zhao >

Re: [FFmpeg-devel] [PATCH V1 2/3] lavc/options_table: Correct the flags for AVCodecContext.flags2

2019-10-05 Thread Michael Niedermayer
On Fri, Oct 04, 2019 at 09:36:54PM +0800, Jun Zhao wrote: > From: Jun Zhao > > Correct the flags for AVCodecContext.flags2. > > Signed-off-by: Jun Zhao > --- > libavcodec/options_table.h |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) LGTM thx [...] -- Michael GnuPG

Re: [FFmpeg-devel] [PATCH] avfilter: add anlms filter

2019-10-05 Thread Reino Wijnsma
On 2019-10-04T10:04:46+0200, Paul B Mahol wrote: > +Apply Normalized Least-Mean-Squares algorithm to first audio stream using > second audio stream. Apply Normalized Least-Mean-Squares algorithm to [the] first audio stream using [the] second audio stream. > +This is adaptive filter used to

[FFmpeg-devel] [PATCH] avformat/chromaprint: Fix fp_format option

2019-10-05 Thread Andriy Gelman
From: Andriy Gelman The unit member was incorrectly set to NULL for fp_format, meaning that this option could not be set on the cli (via recommended settings - raw/compressed/base64). This is fixed in the commit. --- libavformat/chromaprint.c | 2 +- 1 file changed, 1 insertion(+), 1