[FFmpeg-devel] [PATCH 2/2] qsvenc: allow AVC/HEVC encoder violate HRD conformance by default

2020-11-04 Thread Haihao Xiang
User may get better PSNR for the given bitrate for most cases by default and use option '-strict 1' to produce HRD conformant bitstream if required Signed-off-by: Haihao Xiang --- libavcodec/qsvenc_h264.c | 1 + libavcodec/qsvenc_hevc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libav

[FFmpeg-devel] [PATCH 1/2] qsvenc_hevc: allow user set more coding options

2020-11-04 Thread Haihao Xiang
The SDK supports NalHrdConformance, RecoveryPointSEI and AUDelimiter for hevc encoder, so we may allow user to set these coding options like as what we did for h264_qsv encoder. Signed-off-by: Haihao Xiang --- libavcodec/qsvenc.c | 13 + libavcodec/qsvenc_hevc.c | 2 ++ 2 files

[FFmpeg-devel] [PATCH] qsvenc: Value '0' is not a valid value for parameter GopOptFlag

2020-11-04 Thread Haihao Xiang
The accepted values for GopOptFlag are MFX_GOP_CLOSED (1) and MFX_GOP_STRICT (2). Signed-off-by: Haihao Xiang --- libavcodec/qsvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 1ed8f5d973..62921e82a6 100644 --- a/libavcodec

Re: [FFmpeg-devel] [PATCH 2/4] avformat/gxf: Check pkt_len

2020-11-04 Thread Michael Niedermayer
On Tue, Oct 27, 2020 at 05:21:17PM +0100, Michael Niedermayer wrote: > Fixes: Infinite loop > Fixes: > 26576/clusterfuzz-testcase-minimized-ffmpeg_dem_GXF_fuzzer-4823080360476672 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-of

Re: [FFmpeg-devel] [PATCH 1/4] avformat/aiffdec: Check packet size

2020-11-04 Thread Michael Niedermayer
On Tue, Oct 27, 2020 at 05:21:16PM +0100, Michael Niedermayer wrote: > Fixes: Fixes infinite loop > Fixes: > 26575/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-5727522236661760 > > Signed-off-by: Michael Niedermayer > --- > libavformat/aiffdec.c | 2 ++ > 1 file changed, 2 insertions(+

Re: [FFmpeg-devel] [PATCH 4/8] avformat/paf: Check for EOF in read_table()

2020-11-04 Thread Michael Niedermayer
On Sun, Oct 25, 2020 at 12:23:08AM +0200, Michael Niedermayer wrote: > Fixes: OOM > Fixes: > 26528/clusterfuzz-testcase-minimized-ffmpeg_dem_PAF_fuzzer-5081929248145408 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Mich

Re: [FFmpeg-devel] [PATCH 4/4] avformat/vividas: improve extradata packing checks in track_header()

2020-11-04 Thread Michael Niedermayer
On Wed, Oct 28, 2020 at 11:56:43PM +0100, Michael Niedermayer wrote: > Fixes: out of array accesses > Fixes: > 26622/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-6581200338288640 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg

Re: [FFmpeg-devel] [PATCH 3/4] avformat/iff: check size against INT64_MAX

2020-11-04 Thread Michael Niedermayer
On Wed, Oct 28, 2020 at 11:56:42PM +0100, Michael Niedermayer wrote: > Bigger sizes are misinterpreted as negative numbers by the API > Fixes: infinite loop > Fixes: > 26611/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-4890614975692800 > > Found-by: continuous fuzzing process > https://g

Re: [FFmpeg-devel] [PATCH 5/5] avformat/bintext: Check width in idf_read_header()

2020-11-04 Thread Michael Niedermayer
On Mon, Nov 02, 2020 at 01:21:28AM +0100, Michael Niedermayer wrote: > Fixes: division by 0 > Fixes: > 26802/clusterfuzz-testcase-minimized-ffmpeg_dem_IDF_fuzzer-5180591554953216.fuzz > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Sign

Re: [FFmpeg-devel] [PATCH 5/7] avformat/mpegts: Limit copied data to space

2020-11-04 Thread Marton Balint
On Wed, 4 Nov 2020, Michael Niedermayer wrote: Fixes: out of array access Fixes: 26816/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-6282861159907328.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael

Re: [FFmpeg-devel] [PATCH] avformat/dv: fix timestamps of audio packets in case of dropped corrupt audio frames

2020-11-04 Thread Marton Balint
On Wed, 4 Nov 2020, Michael Niedermayer wrote: we have "millisecond" based formats, rounded timestamps we have "exact" cases, maybe the timebase being 1 packet/frame per tick we have "high precission" where the timebase is so precisse it doesnt matter This here though is a bit an oddball, the

Re: [FFmpeg-devel] [PATCH v4] Unbreak av_malloc_max(0) API/ABI

2020-11-04 Thread Joakim Tjernlund
On Wed, 2020-11-04 at 13:38 -0500, Ronald S. Bultje wrote: > > Hi Joakim, > > On Tue, Nov 3, 2020 at 8:57 AM Joakim Tjernlund < > joakim.tjernl...@infinera.com> wrote: > > > On Tue, 2020-11-03 at 14:38 +0100, Andreas Rheinhardt wrote: > > > > > > Timo Rothenpieler: > > > > Given the multitude o

[FFmpeg-devel] [PATCH] avcodec/mss4: Fix memleaks upon allocation error

2020-11-04 Thread Andreas Rheinhardt
During init the mts2 decoder allocates several VLCs and then several buffers in a loop; if one of the latter allocations fails, only the VLCs are freed, not any buffers that might already have been successfully allocated. This commit fixes this by setting the FF_CODEC_CAP_INIT_CLEANUP flag. Signed

Re: [FFmpeg-devel] [PATCH v4] Unbreak av_malloc_max(0) API/ABI

2020-11-04 Thread Ronald S. Bultje
Hi Joakim, On Tue, Nov 3, 2020 at 8:57 AM Joakim Tjernlund < joakim.tjernl...@infinera.com> wrote: > On Tue, 2020-11-03 at 14:38 +0100, Andreas Rheinhardt wrote: > > > > Timo Rothenpieler: > > > Given the multitude of recent serious security issues in Chromium-Based > > > Browsers, is this even s

Re: [FFmpeg-devel] [PATCH 1/7] avcodec/sonic: Allocate several buffers together

2020-11-04 Thread Michael Niedermayer
On Tue, Nov 03, 2020 at 06:57:29PM +0100, Andreas Rheinhardt wrote: > It simplifies freeing them and reduces the amount of allocations. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/sonic.c | 48 -- > 1 file changed, 21 insertions(+), 27 del

Re: [FFmpeg-devel] [PATCH 3/7] avcodec/sonic: Don't hardcode sizeof(int) == 4

2020-11-04 Thread Michael Niedermayer
On Tue, Nov 03, 2020 at 06:57:31PM +0100, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/sonic.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In a rich m

Re: [FFmpeg-devel] [PATCH v2] avformat/nut: Store display matrix side data

2020-11-04 Thread Michael Niedermayer
On Wed, Nov 04, 2020 at 02:14:08AM +0100, Matthias Neugebauer wrote: > Stream side data such as display matrix is currently lost when using NUT. > > Signed-off-by: Matthias Neugebauer > --- > libavformat/nutdec.c | 9 + > libavformat/nutenc.c | 18 ++ > 2 files changed, 27

[FFmpeg-devel] [PATCH] avformat/rtpenc: add option to disable STAP for H.264

2020-11-04 Thread Zhao Zhili
Use non-interleaved mode but disable STAP is a valid use case, for example, the receiver doesn't support STAP. --- libavformat/rtpenc.h | 2 ++ libavformat/rtpenc_h264_hevc.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/rtpenc.h b/libavformat/rtpenc.h

Re: [FFmpeg-devel] [PATCH v4] Unbreak av_malloc_max(0) API/ABI

2020-11-04 Thread Joakim Tjernlund
On Wed, 2020-11-04 at 12:47 +0100, Timo Rothenpieler wrote: > > On 04.11.2020 10:55, Joakim Tjernlund wrote: > > On Wed, 2020-11-04 at 10:51 +0100, Michael Niedermayer wrote: > > > > > > On Tue, Nov 03, 2020 at 02:38:52PM +0100, Andreas Rheinhardt wrote: > > > > Timo Rothenpieler: > > > > > Given

Re: [FFmpeg-devel] [PATCH 2/6] avformat/rtspdec: use SDP_MAX_SIZE for sdp array

2020-11-04 Thread lance . lmwang
On Wed, Nov 04, 2020 at 03:44:22PM +0200, Martin Storsjö wrote: > On Wed, 4 Nov 2020, lance.lmw...@gmail.com wrote: > > > From: Limin Wang > > > > Signed-off-by: Limin Wang > > --- > > libavformat/rtspdec.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavform

Re: [FFmpeg-devel] [PATCH] avformat/argo_brp: remove block_align check for audio

2020-11-04 Thread Zane van Iperen
Causes a divide-by-zero in the rare case where: - the file has an audio stream, - the first audio frame isn't within the first BRP_BASF_LOOKAHEAD frames, - an audio frame is encountered later, and - its chunk header (except num_blocks) contains all zeros (matching the uninitialised structure in

Re: [FFmpeg-devel] [PATCH 2/6] avformat/rtspdec: use SDP_MAX_SIZE for sdp array

2020-11-04 Thread Martin Storsjö
On Wed, 4 Nov 2020, lance.lmw...@gmail.com wrote: From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtspdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index ef084a8..3abf34b 100644 --- a/libavformat/rtspdec.c +++

[FFmpeg-devel] [PATCH 6/6] avformat/rtspdec: return proper error code

2020-11-04 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtspdec.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 3abf34b..a4cd1f6 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -768,7 +768,7 @

[FFmpeg-devel] [PATCH 5/6] avformat/rtsp: check return value of ffurl_read_complete

2020-11-04 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 3a1afa0..fc32e97 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1228,7 +1228,8 @@ start: c

[FFmpeg-devel] [PATCH 3/6] avformat/rtsp: move SDP_MAX_SIZE macro definition to header file

2020-11-04 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtsp.c| 1 - libavformat/rtsp.h| 1 + libavformat/rtspenc.c | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 1b876c9..51a360f 100644 --- a/libavformat/rtsp.c +++

[FFmpeg-devel] [PATCH 4/6] avformat/rtsp: prefer to use variable instead of type

2020-11-04 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 51a360f..3a1afa0 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1990,7 +1990,7 @@ static int udp_read

[FFmpeg-devel] [PATCH 1/6] avformat/rtsp: 16384 -> SDP_MAX_SIZE

2020-11-04 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 49c2d52..1b876c9 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -696,7 +696,7 @@ int ff_sdp_parse(AVFo

[FFmpeg-devel] [PATCH 2/6] avformat/rtspdec: use SDP_MAX_SIZE for sdp array

2020-11-04 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtspdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index ef084a8..3abf34b 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -172,7 +172,7 @@ static

Re: [FFmpeg-devel] [PATCH] tls: Hook up the url_get_short_seek function in the TLS backends

2020-11-04 Thread Martin Storsjö
On Thu, 29 Oct 2020, Andreas Rheinhardt wrote: Martin Storsjö: This makes sure that small seeks forward on https don't end up doing new requests. --- libavformat/tls_gnutls.c | 7 +++ libavformat/tls_libtls.c | 7 +++ libavformat/tls_mbedtls.c | 7 +++ lib

Re: [FFmpeg-devel] [PATCH v4] Unbreak av_malloc_max(0) API/ABI

2020-11-04 Thread Timo Rothenpieler
On 04.11.2020 10:55, Joakim Tjernlund wrote: On Wed, 2020-11-04 at 10:51 +0100, Michael Niedermayer wrote: On Tue, Nov 03, 2020 at 02:38:52PM +0100, Andreas Rheinhardt wrote: Timo Rothenpieler: Given the multitude of recent serious security issues in Chromium-Based Browsers, is this even stil

Re: [FFmpeg-devel] [PATCH v4] Unbreak av_malloc_max(0) API/ABI

2020-11-04 Thread Joakim Tjernlund
On Wed, 2020-11-04 at 10:51 +0100, Michael Niedermayer wrote: > > On Tue, Nov 03, 2020 at 02:38:52PM +0100, Andreas Rheinhardt wrote: > > Timo Rothenpieler: > > > Given the multitude of recent serious security issues in Chromium-Based > > > Browsers, is this even still an issue? > > > Anything not

Re: [FFmpeg-devel] [PATCH v4] Unbreak av_malloc_max(0) API/ABI

2020-11-04 Thread Michael Niedermayer
On Tue, Nov 03, 2020 at 02:38:52PM +0100, Andreas Rheinhardt wrote: > Timo Rothenpieler: > > Given the multitude of recent serious security issues in Chromium-Based > > Browsers, is this even still an issue? > > Anything not up to date enough to have already been fixed has serious > > security issu

Re: [FFmpeg-devel] [PATCH] avformat/nut: Store display matrix side data

2020-11-04 Thread Michael Niedermayer
On Tue, Nov 03, 2020 at 12:37:01AM +0100, Matthias Neugebauer wrote: > Am 03.11.2020 um 00:23 schrieb Michael Niedermayer : > > "st_sd_displaymatrix" is not listed in nut.txt > > that either needs to be added or if its a non standard field it needs a > > X- prefix > > Thanks for the feedback. > >

Re: [FFmpeg-devel] [PATCH] avformat/dv: fix timestamps of audio packets in case of dropped corrupt audio frames

2020-11-04 Thread Michael Niedermayer
On Mon, Nov 02, 2020 at 09:42:21PM +0100, Marton Balint wrote: > > > On Mon, 2 Nov 2020, Michael Niedermayer wrote: > > > > > Please correct me if iam wrong but > > > > in cases where no audio is missing or damaged, this would also ignore > > > > how much > > > > audio is in each packet. So you

Re: [FFmpeg-devel] [PATCH 1/2] libavformat/aviobuf: Forward error from avio_read in ffio_read_size()

2020-11-04 Thread Michael Niedermayer
On Sat, Oct 31, 2020 at 03:18:26PM +0100, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Suggested-by: Andreas Rheinhardt > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/aviobuf.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/libavformat/aviobuf.c b/libavf

Re: [FFmpeg-devel] [PATCH 4/5] avformat/rmdec: remove unneeded memset() on packet allocation

2020-11-04 Thread Michael Niedermayer
On Mon, Nov 02, 2020 at 01:47:25AM +0100, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/rmdec.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c > > index 9e954108f9..6a89143b