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

2020-10-31 Thread 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/libavformat/aviobuf.c index 80a5a565a4..3cc440e4e7 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -686,6 +

[FFmpeg-devel] [PATCH 2/2] avformat/apngdec: Check for incomplete reads in append_extradata()

2020-10-31 Thread Michael Niedermayer
Fixes: OOM Fixes: 26608/clusterfuzz-testcase-minimized-ffmpeg_dem_APNG_fuzzer-4839491644424192 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/apngdec.c | 2 +- 1 file changed, 1 insertion(+)

Re: [FFmpeg-devel] [PATCH 1/4] avformat/apngdec: Check for incomplete reads in append_extradata()

2020-10-31 Thread Michael Niedermayer
On Fri, Oct 30, 2020 at 11:48:11PM +0100, Andreas Rheinhardt wrote: > Michael Niedermayer: > > On Thu, Oct 29, 2020 at 02:25:49PM +0100, Andreas Rheinhardt wrote: > >> Michael Niedermayer: > >>> Fixes: OOM > >>> Fixes: > >>> 26608/clusterfuzz-testcase-minimized-ffmpeg_dem_APNG_fuzzer-4839491644424

Re: [FFmpeg-devel] [PATCH] Moves yuv2yuvX_sse3 to yasm, unrolls main loop and other small optimizations for ~20% speedup.

2020-10-31 Thread Carl Eugen Hoyos
Am Di., 27. Okt. 2020 um 09:56 Uhr schrieb Alan Kelly : > --- /dev/null > +++ b/libswscale/x86/yuv2yuvX.asm > @@ -0,0 +1,105 @@ > +;** > +;* x86-optimized yuv2yuvX > +;* Copyright 2020 Google LLC Either the commit message

Re: [FFmpeg-devel] [PATCH] avformat/dv: allow returning damaged audio

2020-10-31 Thread Carl Eugen Hoyos
Am Do., 29. Okt. 2020 um 22:59 Uhr schrieb Michael Niedermayer : > +static const AVOption dv_options[] = { > +{ "dvaudio_concealment", "", OFFSET(dvaudio_concealment), > AV_OPT_TYPE_INT , {.i64 = AUDIO_CONCEAL_DROP}, 0, INT_MAX, DEC, > "dvaudio_concealment"}, > +{ "drop",

Re: [FFmpeg-devel] [PATCH v3] Add support for playing Audible AAXC (.aaxc) files

2020-10-31 Thread Carl Eugen Hoyos
Am Mi., 8. Apr. 2020 um 05:59 Uhr schrieb Vesselin Bontchev : > +static int mov_aaxc_crypto(MOVContext *c) This function does return error codes in some cases but they are ignored in the calling function. > +fail: > + > +return ret; This does not look like a useful hunk to me, use a fail bl

[FFmpeg-devel] [PATCH v3 1/4] avformat/apngdec: Return error for incomplete header

2020-10-31 Thread Andreas Rheinhardt
If avio_read() could read anything, it returns the number of bytes read, even if it could not read as much as the caller desired. apng_read_header() only checked the return value of its avio_read() calls for being negative and this meant that it was possible for an incomplete header to not be detec

[FFmpeg-devel] [PATCH v3 2/4] avformat/apngdec: Fix size/overflow checks

2020-10-31 Thread Andreas Rheinhardt
apng data consists of parts containing a small header (including a four-byte size field) and a data part; the size field does not account for everything and is actually twelve bytes short of the actual size. In order to make sure that the size fits into an int, the size field is checked for being >

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

2020-10-31 Thread Andreas Rheinhardt
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/libavformat/aviobuf.c > index 80a5a565a4..3cc440e4e7 100644 > --- a/libavformat/aviobuf.c

Re: [FFmpeg-devel] [PATCH] avformat/rtsp: don't overwrite session control uri

2020-10-31 Thread Andriy Gelman
On Wed, 21. Oct 13:39, Andriy Gelman wrote: > On Sat, 10. Oct 19:22, Andriy Gelman wrote: > > From: Andriy Gelman > > > > Fixes #1941 > > > > Currently the session control uri gets overwritten by the media's uri > > when mpegts is signalled in the media description. This happens because > > s->n

[FFmpeg-devel] [PATCH v3 3/4] avformat/apngdec: Check fcTL chunk length when reading header

2020-10-31 Thread Andreas Rheinhardt
Reading the header terminates when an fcTL chunk is encountered in which case read_header returned success without checking the length of said chunk. Yet when read_packet processes this chunk, it checks for the length to be 26 and errors out otherwise. So do so when reading the header, too. Signed

Re: [FFmpeg-devel] [PATCH] Ticket #8750 Add inline function for the vec_xl intrinsic in non-VSX environments

2020-10-31 Thread Andriy Gelman
On Fri, 16. Oct 00:02, Andriy Gelman wrote: > On Fri, 09. Oct 20:17, Andriy Gelman wrote: > > From: Chip Kerchner > > > > --- > > libswscale/ppc/yuv2rgb_altivec.c | 10 ++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/libswscale/ppc/yuv2rgb_altivec.c > > b/libswscale/ppc/yu

[FFmpeg-devel] [PATCH v3 4/4] avformat/apngdec: Remove goto fail that does nothing

2020-10-31 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/apngdec.c | 32 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c index 6b2ce2e251..bf8343faf3 100644 --- a/libavformat/apngdec.c +++ b/libavformat/apngde

Re: [FFmpeg-devel] [PATCH 2/2] avformat/apngdec: Check for incomplete reads in append_extradata()

2020-10-31 Thread Andreas Rheinhardt
Michael Niedermayer: > Fixes: OOM > Fixes: > 26608/clusterfuzz-testcase-minimized-ffmpeg_dem_APNG_fuzzer-4839491644424192 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavformat/apngdec.c

[FFmpeg-devel] [PATCH] avcodec/cbs_av1: infer ref_order_hint when not coded in the bitstream

2020-10-31 Thread James Almer
Signed-off-by: James Almer --- libavcodec/cbs_av1_syntax_template.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c index f351b1de24..dc3d8d1048 100644 --- a/libavcodec/cbs_av1_syntax_templ

Re: [FFmpeg-devel] [PATCH] avformat/dv: allow returning damaged audio

2020-10-31 Thread Marton Balint
On Thu, 29 Oct 2020, Michael Niedermayer wrote: These potentially damaged packets are marked as corrupt. The packet length is predicted based on packet length history, allowing prediction of the common pattern used in NTSC. Fixes: Ticket8762 Sync loss is because of invalid timestamps, this

Re: [FFmpeg-devel] [PATCH] avformat/dv: allow returning damaged audio

2020-10-31 Thread Marton Balint
On Sat, 31 Oct 2020, Carl Eugen Hoyos wrote: Am Do., 29. Okt. 2020 um 22:59 Uhr schrieb Michael Niedermayer : +static const AVOption dv_options[] = { +{ "dvaudio_concealment", "", OFFSET(dvaudio_concealment), AV_OPT_TYPE_INT , {.i64 = AUDIO_CONCEAL_DROP}, 0, INT_MAX, DEC, "dvaudio_conc

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

2020-10-31 Thread Marton Balint
Fixes out of sync timestamps in ticket #8762. Signed-off-by: Marton Balint --- libavformat/dv.c | 16 ++-- tests/ref/seek/lavf-dv | 18 +- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/libavformat/dv.c b/libavformat/dv.c index 3e0d12c0e3..26a7

Re: [FFmpeg-devel] [PATCH] swscale/x86/yuv2rgb: fix crashes when loading alpha from unaligned buffers

2020-10-31 Thread Marton Balint
On Wed, 28 Oct 2020, Marton Balint wrote: Regression since fc6a5883d6af8cae0e96af84dda0ad74b360a084 on SSSE3 enabled CPUs. Fixes ticket #8955. Signed-off-by: Marton Balint --- libswscale/x86/yuv_2_rgb.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/x86/yuv_

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

2020-10-31 Thread Dave Rice
Hi Marton, > On Oct 31, 2020, at 12:56 PM, Marton Balint wrote: > > Fixes out of sync timestamps in ticket #8762. Although Michael’s recent patch does address the issue documented in 8762, I haven’t found this patch to fix the issue. I tried with -c:a copy and with -c:a pcm_s16le with some sa

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

2020-10-31 Thread Carl Eugen Hoyos
Am Sa., 31. Okt. 2020 um 19:43 Uhr schrieb Dave Rice : > > Hi Marton, > > > On Oct 31, 2020, at 12:56 PM, Marton Balint wrote: > > > > Fixes out of sync timestamps in ticket #8762. > > Although Michael’s recent patch does address the issue documented in 8762, I > haven’t found this patch to fix t

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

2020-10-31 Thread Marton Balint
On Sat, 31 Oct 2020, Dave Rice wrote: Hi Marton, On Oct 31, 2020, at 12:56 PM, Marton Balint wrote: Fixes out of sync timestamps in ticket #8762. Although Michael’s recent patch does address the issue documented in 8762, I haven’t found this patch to fix the issue. I tried with -c:a co

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

2020-10-31 Thread Dave Rice
> On Oct 31, 2020, at 3:47 PM, Marton Balint wrote: > On Sat, 31 Oct 2020, Dave Rice wrote: > >> Hi Marton, >> >>> On Oct 31, 2020, at 12:56 PM, Marton Balint wrote: >>> Fixes out of sync timestamps in ticket #8762. >> >> Although Michael’s recent patch does address the issue documented in 87

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

2020-10-31 Thread Marton Balint
On Sat, 31 Oct 2020, Dave Rice wrote: On Oct 31, 2020, at 3:47 PM, Marton Balint wrote: On Sat, 31 Oct 2020, Dave Rice wrote: Hi Marton, On Oct 31, 2020, at 12:56 PM, Marton Balint wrote: Fixes out of sync timestamps in ticket #8762. Although Michael’s recent patch does address the i

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

2020-10-31 Thread Dave Rice
> On Oct 31, 2020, at 5:15 PM, Marton Balint wrote: > On Sat, 31 Oct 2020, Dave Rice wrote: >>> On Oct 31, 2020, at 3:47 PM, Marton Balint wrote: >>> On Sat, 31 Oct 2020, Dave Rice wrote: Hi Marton, > On Oct 31, 2020, at 12:56 PM, Marton Balint wrote: > Fixes out of sync timestamp

[FFmpeg-devel] [PATCH 6/6] avformat/concatdec: use av_strstart()

2020-10-31 Thread Michael Niedermayer
Fixes: out array read Fixes: 26610/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-5631838049271808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/concatdec.c | 8 1 file ch

[FFmpeg-devel] [PATCH 1/6] avformat/avidec: Use av_sat_sub64() in check_stream_max_drift()

2020-10-31 Thread Michael Niedermayer
Fixes: signed integer overflow: 8833900919969684211 - -9223372036854775808 cannot be represented in type 'long' Fixes: 26726/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-5669377724383232 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg

[FFmpeg-devel] [PATCH 3/6] avformat/mov: Use av_sat_add64() in mov_read_sidx()

2020-10-31 Thread Michael Niedermayer
This avoids a potential integer overflow, no testcase is known Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 8a66fb9674..3abb9d3e99 100644 --- a/libavformat/mov.c +++ b/liba

[FFmpeg-devel] [PATCH 2/6] avformat/mov: Avoid overflow in end computation in mov_read_custom()

2020-10-31 Thread Michael Niedermayer
Fixes: signed integer overflow: 18 + 9223372036854775799 cannot be represented in type 'long' Fixes: 26731/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5696846019952640 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Mic

[FFmpeg-devel] [PATCH 5/6] avformat/bintext: Check width

2020-10-31 Thread Michael Niedermayer
Fixes: division by 0 Fixes: 26780/clusterfuzz-testcase-minimized-ffmpeg_dem_ADF_fuzzer-5117945027756032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/bintext.c | 2 ++ 1 file changed, 2 ins

[FFmpeg-devel] [PATCH 4/6] avcodec/mobiclip: Bound planar prediction value

2020-10-31 Thread Michael Niedermayer
Alternatively we could wrap around or error out. Wrap around would look most messy as downstream computations would need to wrap as well. I did not find a official specification which would list what to do with huge values. Fixes: signed integer overflow: 2 * 1073741952 cannot be represented in ty

Re: [FFmpeg-devel] [PATCH v2] fate: Add test for Musepack SV8 decoding

2020-10-31 Thread Andreas Rheinhardt
Andreas Rheinhardt: > While the FATE suite contains a sample file for Musepack 8, it did not > use it to test the decoder; it is only used in the mpc8-demux test that > tests the demuxer via streamcopy. Therefore this commit adds an actual > encoder test. > > The test uses the framecrc output, bec

Re: [FFmpeg-devel] [PATCH] avcodec/mpc8: Unobfuscate sign-extension

2020-10-31 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/mpc8.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c > index 03838a9351..631bac2753 100644 > --- a/libavcodec/mpc8.c > +++ b/libavcodec/mpc8.c > @@ -384,7 +

Re: [FFmpeg-devel] [PATCH 2/4] avformat/concatdec: Check filename length before use

2020-10-31 Thread Michael Niedermayer
On Thu, Oct 29, 2020 at 04:22:23PM +0100, Andreas Rheinhardt wrote: > Nicolas George: > > Michael Niedermayer (12020-10-28): > >> Fixes: out array read > >> Fixes: > >> 26610/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-5631838049271808 > >> > >> Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCH] avformat/dhav: also support ZLAV packets

2020-10-31 Thread Michael Keeley
> -Original Message- > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf > Of Paul B Mahol > Sent: Saturday, 24 October 2020 9:03 pm > To: FFmpeg development discussions and patches > Cc: Michael Keeley > Subject: Re: [FFmpeg-devel] [PATCH] avformat/dhav: also support ZL