[FFmpeg-devel] [PATCH 3/6] avformat/aviobuf: Don't use NULL as src for memcpy

2022-09-28 Thread Andreas Rheinhardt
This might happen in avio_write() if size == 0 when the direct codepath is taken. It is undefined behaviour according to the spec although it happens to work in practice. Fixes the webm-webvtt-remux FATE-test under UBSan. Signed-off-by: Andreas Rheinhardt --- libavformat/aviobuf.c | 4 +++- 1 fi

[FFmpeg-devel] [PATCH 4/6] avcodec/jrevdct: Fix UB left shifts of negative numbers

2022-09-28 Thread Andreas Rheinhardt
Affected the rv20-1239 FATE test. Signed-off-by: Andreas Rheinhardt --- libavcodec/jrevdct.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/libavcodec/jrevdct.c b/libavcodec/jrevdct.c index 36160cb663..7f1863515f 100644 --- a/libavcod

[FFmpeg-devel] [PATCH 5/6] avcodec/mpegvideo: Fix undefined left shift of negative numbers

2022-09-28 Thread Andreas Rheinhardt
Fixes the rv20-1239 FATE-test. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index d8c7bc687d..5095149eaa 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcode

[FFmpeg-devel] [PATCH 6/6] avcodec/mpegvideo_dec: Fix UB NULL + 0

2022-09-28 Thread Andreas Rheinhardt
Affected the mpeg2-field-enc FATE-test. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c index 5b37e79e36..6d1edc027a 100644 --- a/libavcodec/mpegvideo_

Re: [FFmpeg-devel] [PATCH] swscale/swscale_unscaled: Fix undefined NULL + 0

2022-09-28 Thread Michael Niedermayer
On Wed, Sep 28, 2022 at 08:39:09PM +0200, Andreas Rheinhardt wrote: > Affected the fitsdec-gbrp16 FATE-test. > > Signed-off-by: Andreas Rheinhardt > --- > libswscale/swscale_unscaled.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libswscale/swscale_unscaled.c b

Re: [FFmpeg-devel] [PATCH] avformat/mpegtsenc: add pcr_at_keyframe flag

2022-09-28 Thread Marton Balint
On Wed, 28 Sep 2022, Zhao Zhili wrote: From: Zhao Zhili Add PCR at keyframe can be undesirable when -pcr_period is specified. Add an flag to disable this behavior. Actually you are disabling the writing of random access indicators, not only PCRs. PCR's are just there because it is mandat

Re: [FFmpeg-devel] [PATCH] swscale/swscale_unscaled: Fix undefined NULL + 0

2022-09-28 Thread Andreas Rheinhardt
Michael Niedermayer: > On Wed, Sep 28, 2022 at 08:39:09PM +0200, Andreas Rheinhardt wrote: >> Affected the fitsdec-gbrp16 FATE-test. >> >> Signed-off-by: Andreas Rheinhardt >> --- >> libswscale/swscale_unscaled.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/li

Re: [FFmpeg-devel] [PATCH 1/3] lavc/encode: make sure frame timebase matches encoder, when set

2022-09-28 Thread Marton Balint
On Wed, 28 Sep 2022, Anton Khirnov wrote: AVFrame.time_base has been added recently, but is currently not used for anything. Prepare for its use in encoders by rejecting frames where time_base is set, but differs from the AVCodecContext one. How is that not an API break? Users can encode AV

Re: [FFmpeg-devel] [PATCH] swscale/swscale_unscaled: Fix undefined NULL + 0

2022-09-28 Thread Michael Niedermayer
On Wed, Sep 28, 2022 at 09:43:56PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > On Wed, Sep 28, 2022 at 08:39:09PM +0200, Andreas Rheinhardt wrote: > >> Affected the fitsdec-gbrp16 FATE-test. > >> > >> Signed-off-by: Andreas Rheinhardt > >> --- > >> libswscale/swscale_unscaled.c |

Re: [FFmpeg-devel] [PATCH 3/6] avformat/aviobuf: Don't use NULL as src for memcpy

2022-09-28 Thread James Almer
On 9/28/2022 3:58 PM, Andreas Rheinhardt wrote: This might happen in avio_write() if size == 0 when the direct codepath is taken. It is undefined behaviour according to the spec although it happens to work in practice. Fixes the webm-webvtt-remux FATE-test under UBSan. Signed-off-by: Andreas Rhe

Re: [FFmpeg-devel] [PATCH 3/6] avformat/aviobuf: Don't use NULL as src for memcpy

2022-09-28 Thread Andreas Rheinhardt
James Almer: > On 9/28/2022 3:58 PM, Andreas Rheinhardt wrote: >> This might happen in avio_write() if size == 0 >> when the direct codepath is taken. It is undefined behaviour >> according to the spec although it happens to work in practice. >> Fixes the webm-webvtt-remux FATE-test under UBSan. >>

Re: [FFmpeg-devel] [PATCH] avcodec/ac3dsp: Remove unused parameter

2022-09-28 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Forgotten in fd98594a8831ce037a495b6d7e090bd8f81e83a1. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/ac3dec.c | 2 +- > libavcodec/ac3dsp.c | 8 > libavcodec/ac3dsp.h | 8 > libavcodec/ac3enc.c

Re: [FFmpeg-devel] [PATCH 1/2] avformat/vividas: Check packet size

2022-09-28 Thread Michael Niedermayer
On Wed, Sep 28, 2022 at 05:16:05PM +0200, Anton Khirnov wrote: > Quoting Michael Niedermayer (2022-09-22 20:08:51) > > Fixes: signed integer overflow: 119760682 - -2084600173 cannot be > > represented in type 'int' > > Fixes: > > 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-6745

[FFmpeg-devel] [PATCH] avcodec/pngdec: Don't use unsigned for width, height

2022-09-28 Thread Andreas Rheinhardt
Otherwise p->linesize[0] * y will be evaluated as an unsigned which leads to segfaults in case linesize is negative. This happens in the apng-dispose-previous FATE-test in case one makes get_buffer return pictures with negative linesizes. Signed-off-by: Andreas Rheinhardt --- libavcodec/pngdec.c

Re: [FFmpeg-devel] [PATCH 0/3] RISC-V V swscale pixel format conversions

2022-09-28 Thread Lynne
Sep 28, 2022, 17:29 by r...@remlab.net: > Hello, > > This adds the pixel format conversions that appear to covered by checkasm > (plus YUYV to I422 for which a patch was sent already). > > RVV has no register-register interleaving/deinterleaving instructions, so this > uses strided loads or stores

[FFmpeg-devel] [PATCH] riscv: Fix linking without RVV; change #ifdef into #if

2022-09-28 Thread Martin Storsjö
--- This should hopefully fix the current build failures at http://fate.ffmpeg.org/history.cgi?slot=riscv64-linux-gnu-clang-14. --- libavcodec/riscv/fmtconvert_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/riscv/fmtconvert_init.c b/libavcodec/riscv/fmtconve

<    1   2