[FFmpeg-devel] [PATCH v1] avformat/wavdec.c: copy id3 metadata to format metadata and stream side data

2019-10-19 Thread Jun Li
Enhancement #7803 Copy id3 metadata to format meta data and steams side data. Signed-off-by: Jun Li --- libavformat/wavdec.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index 52194f54ef..d82bdaaa66 100644 --- a/libavformat/wavdec.c

Re: [FFmpeg-devel] [PATCH v2] avformat/options: don't call avformat_free_context() within avformat_alloc_context()

2019-10-19 Thread James Almer
On 10/19/2019 8:42 PM, Andreas Rheinhardt wrote: > James Almer: >> avformat_free_context() expects AVFormatContext->internal to not be NULL. >> >> Signed-off-by: James Almer >> --- >> libavformat/options.c | 10 ++ >> 1 file changed, 6 insertions(+), 4 deletions(-) >> >> diff --git a/liba

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/atrac9dec: Check precision_fine/coarse

2019-10-19 Thread Lynne
Oct 19, 2019, 21:39 by mich...@niedermayer.cc: I do not know if this or some clipping or other is the best course of action. I have only a fuzzed file which triggers this and neither reference code nor specification which would document what to do. If someone has some reference please reply Clip i

Re: [FFmpeg-devel] [PATCH v2] avformat/options: don't call avformat_free_context() within avformat_alloc_context()

2019-10-19 Thread Andreas Rheinhardt
James Almer: > avformat_free_context() expects AVFormatContext->internal to not be NULL. > > Signed-off-by: James Almer > --- > libavformat/options.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/libavformat/options.c b/libavformat/options.c > index c188c23

Re: [FFmpeg-devel] [PATCH 4/5] avutil/lfg: Correct index type to avoid undefined behavior

2019-10-19 Thread James Almer
On 10/19/2019 6:15 PM, Michael Niedermayer wrote: > On Sat, Oct 19, 2019 at 05:45:04PM -0300, James Almer wrote: >> On 10/19/2019 5:39 PM, Michael Niedermayer wrote: >>> Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in >>> type 'int' >>> Fixes: >>> 18333/clusterfuzz-testcas

Re: [FFmpeg-devel] [PATCH] avformat/nutenc: Fix memleak

2019-10-19 Thread Michael Niedermayer
On Sat, Oct 19, 2019 at 04:17:24PM -0300, James Almer wrote: > On 10/19/2019 1:01 PM, Michael Niedermayer wrote: > > On Thu, Oct 17, 2019 at 11:06:06AM +0200, Andreas Rheinhardt wrote: > >> Fixes ticket #8295. > >> > >> Signed-off-by: Andreas Rheinhardt > >> --- > >> libavformat/nutenc.c | 5

Re: [FFmpeg-devel] [PATCH 4/5] avutil/lfg: Correct index type to avoid undefined behavior

2019-10-19 Thread Michael Niedermayer
On Sat, Oct 19, 2019 at 05:45:04PM -0300, James Almer wrote: > On 10/19/2019 5:39 PM, Michael Niedermayer wrote: > > Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in > > type 'int' > > Fixes: > > 18333/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COMFORTNOISE_fuzzer-56

Re: [FFmpeg-devel] [PATCH 4/5] avutil/lfg: Correct index type to avoid undefined behavior

2019-10-19 Thread James Almer
On 10/19/2019 5:39 PM, Michael Niedermayer wrote: > Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type > 'int' > Fixes: > 18333/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COMFORTNOISE_fuzzer-5668481831272448 > > Found-by: continuous fuzzing process > https://git

[FFmpeg-devel] [PATCH 2/5] avcodec/wmalosslessdec: Check block_align

2019-10-19 Thread Michael Niedermayer
Fixes: NULL pointer dereference Fixes: 18331/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5652847445671936 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/wmalosslessde

[FFmpeg-devel] [PATCH 3/5] avcodec/atrac3plusdec: add FF_CODEC_CAP_INIT_CLEANUP

2019-10-19 Thread Michael Niedermayer
Fixes: memleaks Fixes: 18332/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC3P_fuzzer-5655654374572032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/atrac3plusdec.c | 3 ++- 1 file c

[FFmpeg-devel] [PATCH 1/5] avcodec/atrac9dec: Check precision_fine/coarse

2019-10-19 Thread Michael Niedermayer
I do not know if this or some clipping or other is the best course of action. I have only a fuzzed file which triggers this and neither reference code nor specification which would document what to do. If someone has some reference please reply Fixes: out of array access Fixes: 18330/clusterfuzz-

[FFmpeg-devel] [PATCH 5/5] avcodec/cngdec: Remove AV_CODEC_CAP_DELAY

2019-10-19 Thread Michael Niedermayer
As is the decoder will never stop, it will cause an infinite loop. The RFC seems only to speak of non empty packets so endlessly generating noise from the last empty flush packets seems wrong. Fixes: infinite loop Fixes: 18333/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COMFORTNOISE_fuzze

[FFmpeg-devel] [PATCH 4/5] avutil/lfg: Correct index type to avoid undefined behavior

2019-10-19 Thread Michael Niedermayer
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 18333/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COMFORTNOISE_fuzzer-5668481831272448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-b

Re: [FFmpeg-devel] [PATCH] avformat/nutenc: Fix memleak

2019-10-19 Thread James Almer
On 10/19/2019 1:01 PM, Michael Niedermayer wrote: > On Thu, Oct 17, 2019 at 11:06:06AM +0200, Andreas Rheinhardt wrote: >> Fixes ticket #8295. >> >> Signed-off-by: Andreas Rheinhardt >> --- >> libavformat/nutenc.c | 5 - >> 1 file changed, 4 insertions(+), 1 deletion(-) > > will apply > > t

[FFmpeg-devel] [PATCH] avfilter/vf_tile: fix memory leak

2019-10-19 Thread Paul B Mahol
Fixes #8313 Signed-off-by: Paul B Mahol --- libavfilter/vf_tile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_tile.c b/libavfilter/vf_tile.c index 439689a14d..6278f72abb 100644 --- a/libavfilter/vf_tile.c +++ b/libavfilter/vf_tile.c @@ -262,6 +262,7 @@ static av_cold void

[FFmpeg-devel] [PATCH v2] avformat/options: don't call avformat_free_context() within avformat_alloc_context()

2019-10-19 Thread James Almer
avformat_free_context() expects AVFormatContext->internal to not be NULL. Signed-off-by: James Almer --- libavformat/options.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavformat/options.c b/libavformat/options.c index c188c23506..756f4d53c5 100644 --- a/li

Re: [FFmpeg-devel] [PATCH] avformat/options: don't call avformat_free_context() within avformat_alloc_context()

2019-10-19 Thread Andreas Rheinhardt
James Almer: > avformat_free_context() expects AVFormatContext->internal to not be NULL. > > Signed-off-by: James Almer > --- > Alternatively we could check for internal != NULL in avformat_free_context() > before dereferencing it, but i don't think it makes sense calling that > function > at al

Re: [FFmpeg-devel] [PATCH 1/2] mpeg4_unpack_bframes: Avoid allocations and copies of packet structures

2019-10-19 Thread Michael Niedermayer
On Fri, Oct 18, 2019 at 04:44:00AM +, Andreas Rheinhardt wrote: > Michael Niedermayer: > > On Wed, Oct 16, 2019 at 12:43:07PM +0200, Paul B Mahol wrote: > >> Could someone apply this? > > > > will apply > > > > thx > > > > [...] > > > Thanks. There is also a follow-up patch [1] to this that

Re: [FFmpeg-devel] [PATCH] avcodec/zmbv: Call decode_intra directly

2019-10-19 Thread Michael Niedermayer
On Sat, Oct 19, 2019 at 04:25:07PM +0200, Paul B Mahol wrote: > LGTM will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If a bugfix only changes things apparently unrelated to the bug with no further explanation, that is a good sign that the bugfix

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/g729dec: Avoid computing invalid temporary pointers for ff_acelp_weighted_vector_sum()

2019-10-19 Thread Michael Niedermayer
On Thu, Oct 17, 2019 at 12:27:39PM +0200, Paul B Mahol wrote: > probably ok will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Elect your leaders based on what they did after the last election, not based on what they say before an election. signa

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/g729postfilter: Fix left shift of negative value

2019-10-19 Thread Michael Niedermayer
On Thu, Oct 17, 2019 at 12:28:18PM +0200, Paul B Mahol wrote: > lgtm will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The smallest minority on earth is the individual. Those who deny individual rights cannot claim to be defenders of minorities.

Re: [FFmpeg-devel] [PATCH] avformat/nutenc: Fix memleak

2019-10-19 Thread Michael Niedermayer
On Thu, Oct 17, 2019 at 11:06:06AM +0200, Andreas Rheinhardt wrote: > Fixes ticket #8295. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/nutenc.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BAD

Re: [FFmpeg-devel] [PATCH] avcodec/zmbv: Call decode_intra directly

2019-10-19 Thread Paul B Mahol
LGTM On 10/17/19, Andreas Rheinhardt wrote: > zmbv has only one function for decoding intra frames, namely > decode_intra; and yet up until now it has been called via a function > pointer. This has been changed. > > This also removes spec-incompliant conversions between function pointers > and po

[FFmpeg-devel] [PATCH] avfilter/settb: switch to activate

2019-10-19 Thread Paul B Mahol
Now correctly updates EOF timestamp. Signed-off-by: Paul B Mahol --- libavfilter/settb.c | 51 ++--- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/libavfilter/settb.c b/libavfilter/settb.c index 83616c1361..dba52cff31 100644 --- a/libavfil

[FFmpeg-devel] [PATCH] avformat/options: don't call avformat_free_context() within avformat_alloc_context()

2019-10-19 Thread James Almer
avformat_free_context() expects AVFormatContext->internal to not be NULL. Signed-off-by: James Almer --- Alternatively we could check for internal != NULL in avformat_free_context() before dereferencing it, but i don't think it makes sense calling that function at all if the AVFormatContext wasn'

Re: [FFmpeg-devel] [PATCH v2] avformat: Add max_probe_packets option

2019-10-19 Thread Michael Niedermayer
On Thu, Oct 17, 2019 at 10:49:20AM -0400, Andriy Gelman wrote: > From: Andriy Gelman > > Allows user to set maximum number of buffered packets when > probing a codec. It was a hard-coded parameter before this commit. > --- > doc/formats.texi| 4 > libavformat/avformat.h | 7

Re: [FFmpeg-devel] [PATCH 2/2] avformat/avienc: add deinit function

2019-10-19 Thread Paul B Mahol
LGTM On 10/19/19, James Almer wrote: > Fixes ticket #8302 > > Signed-off-by: James Almer > --- > libavformat/avienc.c | 20 +++- > 1 file changed, 15 insertions(+), 5 deletions(-) > > diff --git a/libavformat/avienc.c b/libavformat/avienc.c > index ac0f04c354..5f143bccce 100644

[FFmpeg-devel] [PATCH 1/2] avformat: call AVOutputFormat->deinit() when freeing the context

2019-10-19 Thread James Almer
Despite the doxy stating that it's called when the muxer is destroyed, this was not true in practice. It's only called by av_write_trailer() and on init() failure. An AVFormatContext may be closed without writing the trailer if errors ocurred while muxing packets, so in order to prevent memory lea

[FFmpeg-devel] [PATCH 2/2] avformat/avienc: add deinit function

2019-10-19 Thread James Almer
Fixes ticket #8302 Signed-off-by: James Almer --- libavformat/avienc.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/libavformat/avienc.c b/libavformat/avienc.c index ac0f04c354..5f143bccce 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @