Re: [FFmpeg-devel] [PATCH 1/5] avcodec/mlpenc: Set AV_PKT_FLAG_KEY manually

2021-09-26 Thread Andreas Rheinhardt
Andreas Rheinhardt: > TrueHD/MLP is one of the audio formats with keyframes. Currently, > the generic encoding code just sets the keyframe flag for all > returned packets, yet this is wrong for these encoders and will > be changed in a future commit. So set the flag here for those > packets that

Re: [FFmpeg-devel] [PATCH 07/27] fate/caf: Add remux tests

2021-09-26 Thread Andreas Rheinhardt
Andreas Rheinhardt: > These test both the muxer as well as the demuxer. > > Signed-off-by: Andreas Rheinhardt > --- > tests/fate/caf.mak | 30 +- > tests/ref/fate/caf-alac-remux | 28 > tests/ref/fate/caf-amr_nb-remux

Re: [FFmpeg-devel] [PATCH v4 2/4] avformat/matroska{dec, enc} Parse BlockAdditionMapping elements

2021-09-26 Thread Andreas Rheinhardt
quietvoid: > Adds handling of dvcC/dvvC block addition mappings. > The parsing creates AVDOVIDecoderConfigurationRecord side data for the video > track. > The configuration block is written when muxing into MKV if DOVI side data is > present for the track. > > In version 2.2 of the Dolby ISOM

Re: [FFmpeg-devel] [PATCH v4 3/4] avformat/mov: Refactor DOVI box parsing to use ff_isom_parse_dvcc_dvvc

2021-09-26 Thread Andreas Rheinhardt
quietvoid: > Read at most 24 bytes, but in reality only 5 bytes are used for parsing. > The rest of the bytes are reserved in the specification. > > Signed-off-by: quietvoid > --- > libavformat/mov.c | 51 ++- > 1 file changed, 10 insertions(+), 41

Re: [FFmpeg-devel] [PATCH v4 1/4] avformat/dovi_isom Implement Dolby Vision configuration parsing/writing

2021-09-26 Thread myp...@gmail.com
On Mon, Sep 27, 2021 at 10:57 AM quietvoid wrote: > > According to specification "Dolby Vision Stream Within the ISO Base Media > File Format Version 2.2" > > This only adds support for the "Dolby Vision configuration box". > Other configuration boxes such as "Dolby Vision enhancement layer >

[FFmpeg-devel] [PATCH 4/4] avfilter/preserve_color: Add necessary headers

2021-09-26 Thread Andreas Rheinhardt
Fixes checkheaders. Signed-off-by: Andreas Rheinhardt --- Will apply this soon. libavfilter/preserve_color.h | 4 1 file changed, 4 insertions(+) diff --git a/libavfilter/preserve_color.h b/libavfilter/preserve_color.h index ac0587ad1e..158ee226bb 100644 ---

[FFmpeg-devel] [PATCH 3/4] avfilter/af_afade: Remove impossible branch

2021-09-26 Thread Andreas Rheinhardt
Also don't call ff_inlink_queued_samples() unnecessarily often. Fixes Coverity issue 1427665. Signed-off-by: Andreas Rheinhardt --- libavfilter/af_afade.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c

[FFmpeg-devel] [PATCH 2/4] avfilter/formats: Update outdated comment

2021-09-26 Thread Andreas Rheinhardt
Forgotten in 06754f7bbf341062581accc27b5cce353e99fd82. Signed-off-by: Andreas Rheinhardt --- libavfilter/formats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 29e318aa3b..ec3b8ebd8d 100644 --- a/libavfilter/formats.c

[FFmpeg-devel] [PATCH 1/4] avfilter/formats: Don't unnecessarily reget pixfmt descriptor

2021-09-26 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- If I am not mistaken, then the check for chroma is wrong, as there are pixel formats with just luma and alpha. The clean check would probably be desc->nb_components > (1 + !!(desc->flags & AV_PIX_FMT_FLAG_ALPHA)), while desc->nb_components > 2 would also just

[FFmpeg-devel] [PATCH v4 4/4] avformat/mpegts: Refactor DOVI descriptor parsing to use ff_isom_parse_dvcc_dvvc

2021-09-26 Thread quietvoid
Also fixes incorrect parsing of dv_bl_signal_compatibility_id, which was often set to zero instead of the actual value, for mpegts only. Signed-off-by: quietvoid --- libavformat/mpegts.c | 44 1 file changed, 4 insertions(+), 40 deletions(-) diff

[FFmpeg-devel] [PATCH v4 3/4] avformat/mov: Refactor DOVI box parsing to use ff_isom_parse_dvcc_dvvc

2021-09-26 Thread quietvoid
Read at most 24 bytes, but in reality only 5 bytes are used for parsing. The rest of the bytes are reserved in the specification. Signed-off-by: quietvoid --- libavformat/mov.c | 51 ++- 1 file changed, 10 insertions(+), 41 deletions(-) diff --git

[FFmpeg-devel] [PATCH v4 2/4] avformat/matroska{dec, enc} Parse BlockAdditionMapping elements

2021-09-26 Thread quietvoid
Adds handling of dvcC/dvvC block addition mappings. The parsing creates AVDOVIDecoderConfigurationRecord side data for the video track. The configuration block is written when muxing into MKV if DOVI side data is present for the track. In version 2.2 of the Dolby ISOM specification, there is

[FFmpeg-devel] [PATCH v4 1/4] avformat/dovi_isom Implement Dolby Vision configuration parsing/writing

2021-09-26 Thread quietvoid
According to specification "Dolby Vision Stream Within the ISO Base Media File Format Version 2.2" This only adds support for the "Dolby Vision configuration box". Other configuration boxes such as "Dolby Vision enhancement layer configuration box" are not supported. The new functions will be

Re: [FFmpeg-devel] [PATCH v1 1/1] avformat/amr: Return PATCHWELCOME on stereo files

2021-09-26 Thread Sun Zhenliang
在 2021年9月26日 +0800 20:40,myp...@gmail.com ,写道: > On Thu, Sep 16, 2021 at 11:24 AM sunzhenliang > wrote: > > > > Signed-off-by: sunzhenliang > > --- > > libavformat/amr.c | 22 ++ > > 1 file changed, 18 insertions(+), 4 deletions(-) > > > > diff --git a/libavformat/amr.c

Re: [FFmpeg-devel] [PATCH] avformat/isom: enable TTML demuxing from MP4-likes

2021-09-26 Thread Andreas Rheinhardt
Jan Ekström: > As ff_codec_movsubtitle_tags is shared between demuxing and muxing, > the muxing parts have to go in before demuxing in order to not > generate invalid media, as adding an identifier to this list enables > muxing into QTFF/MOV. Does this mean that MOV_MP4_TTML_TAG is legal for

[FFmpeg-devel] [PATCH 1/1] libavformat/rtmp: Implements RTMP reconnect feature

2021-09-26 Thread Jordi Cenzano
Nowadays when you are streaming to a live platform if the RTMP(s) server needs to restarted for any reason (ex: deploy new version) the RTMP connection is interrupted (probably after some draining time). Facebook will publish a proposal to avoid that by sending a GoAway message in the RTMP

Re: [FFmpeg-devel] [PATCH] avfilter/elbg: Extend filter to include alpha values in the quantization procedure

2021-09-26 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Michael Niedermayer > Sent: Sunday, 26 September 2021 18:52 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH] avfilter/elbg: Extend filter to > include alpha values in the

Re: [FFmpeg-devel] [PATCH] avfilter/palettegen, paletteuse: Extend the palette conversion filters to support palettes with alpha

2021-09-26 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Michael Niedermayer > Sent: Sunday, 26 September 2021 19:01 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH] avfilter/palettegen, paletteuse: > Extend the palette

[FFmpeg-devel] [PATCH v2 2/2] avfilter/palettegen: Cosmetic changes

2021-09-26 Thread Soft Works
Signed-off-by: softworkz --- libavfilter/vf_palettegen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c index 98dff46fe0..7a74a3752f 100644 --- a/libavfilter/vf_palettegen.c +++ b/libavfilter/vf_palettegen.c @@

[FFmpeg-devel] [PATCH v2 1/2] avfilter/palettegen, paletteuse: Extend the palette conversion filters to support palettes with alpha

2021-09-26 Thread Soft Works
Usage example: ffmpeg -y -loglevel verbose -i "..\fate-suite\apng\o_sample.png" -filter_complex "split[split1][split2];[split1]palettegen=max_colors=254:use_alpha=1[pal1];[split2][pal1]paletteuse=use_alpha=1" -frames:v 1 out.png Signed-off-by: softworkz --- doc/filters.texi| 8

Re: [FFmpeg-devel] [PATCH] avfilter/palettegen, paletteuse: Extend the palette conversion filters to support palettes with alpha

2021-09-26 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Michael Niedermayer > Sent: Sunday, 26 September 2021 19:01 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH] avfilter/palettegen, paletteuse: > Extend the palette

Re: [FFmpeg-devel] [PATCH] avfilter/palettegen, paletteuse: Extend the palette conversion filters to support palettes with alpha

2021-09-26 Thread Michael Niedermayer
On Sun, Sep 26, 2021 at 12:43:37AM +, Soft Works wrote: > Usage example: > > ffmpeg -y -loglevel verbose -i "..\fate-suite\apng\o_sample.png" > -filter_complex > "split[split1][split2];[split1]palettegen=max_colors=254:use_alpha=1[pal1];[split2][pal1]paletteuse=use_alpha=1" > -frames:v 1

Re: [FFmpeg-devel] [PATCH] avfilter/elbg: Extend filter to include alpha values in the quantization procedure

2021-09-26 Thread Michael Niedermayer
On Sun, Sep 26, 2021 at 04:57:25AM +, Soft Works wrote: > Usage example: > > ffmpeg -y -loglevel verbose -i "..\fate-suite\apng\o_sample.png" > -filter_complex "elbg=pal8=1:use_alpha=1" -frames:v 1 out.png > > Signed-off-by: softworkz > --- > doc/filters.texi | 4 >

[FFmpeg-devel] [PATCH] avformat/isom: enable TTML demuxing from MP4-likes

2021-09-26 Thread Jan Ekström
As ff_codec_movsubtitle_tags is shared between demuxing and muxing, the muxing parts have to go in before demuxing in order to not generate invalid media, as adding an identifier to this list enables muxing into QTFF/MOV. --- libavformat/isom.c | 2 ++

[FFmpeg-devel] [PATCH] avformat/avio{, buf}: introduce public AVIOContext::bytes_read

2021-09-26 Thread Jan Ekström
Such a field can be seen as generally useful in cases where the API user is not implementing custom AVIO callbacks, but still would like to know if data is being read even if AVPackets are not being returned. --- Originally I thought about making an accessor for the private field, to not grow the

Re: [FFmpeg-devel] [PATCH 3/4] avcodec/apedec: Fix integer overflow in filter_fast_3320()

2021-09-26 Thread Michael Niedermayer
On Fri, Sep 17, 2021 at 09:56:15PM +0200, Michael Niedermayer wrote: > Fixes: signed integer overflow: 2145649668 + 3956526 cannot be represented in > type 'int' > Fixes: > 38351/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-4647077926273024 > > Found-by: continuous fuzzing

Re: [FFmpeg-devel] [PATCH 2/5] tools/target_dec_fuzzer: Adjust threshold for WMV2

2021-09-26 Thread Michael Niedermayer
On Wed, Sep 15, 2021 at 10:00:45PM +0200, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 37737/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV2_fuzzer-4923012999151616 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg >

Re: [FFmpeg-devel] [PATCH 5/5] avformat/mov: Fix last mfra check

2021-09-26 Thread Michael Niedermayer
On Wed, Sep 15, 2021 at 10:00:48PM +0200, Michael Niedermayer wrote: > Fixes: signed integer overflow: 9223372036854775360 + 536870912 cannot be > represented in type 'long' > Fixes: > 37940/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6095637855207424 > > Found-by: continuous fuzzing

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/mxpegdec: Check for AVDISCARD_ALL

2021-09-26 Thread Michael Niedermayer
On Tue, Sep 14, 2021 at 10:58:18PM +0200, Michael Niedermayer wrote: > Fixes: Fixes NULL pointer dereference > Fixes: > 36610/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-6052641783283712 > Fixes: >

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/utils: ARGO writes 4x4 blocks without regard to the image dimensions

2021-09-26 Thread Michael Niedermayer
On Fri, Sep 03, 2021 at 08:39:10PM +0200, Michael Niedermayer wrote: > Fixes: out of array access > Fixes: > 37197/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-5877046382297088 > > Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCH v4 3/3] swscale: add input/output support for X2BGR10LE

2021-09-26 Thread Michael Niedermayer
On Fri, Sep 24, 2021 at 07:09:15PM -0400, Manuel Stoeckl wrote: > Signed-off-by: Manuel Stoeckl > --- > This is the same as PATCH v3 3/3 of the same name, except with the > filter-pixdesc-x2bgr10le test reference value fixed. (My local ffmpeg > copy sometimes fails to set up and run the

Re: [FFmpeg-devel] [PATCH v3 2/5] avformat/matroskadec: Parse dvcC/dvvC block additional mapping

2021-09-26 Thread quietvoid
On 26/09/2021 07.13, myp...@gmail.com wrote: On Sat, Sep 25, 2021 at 11:58 PM quietvoid wrote: The parsing was implemented in a new dovi_isom file for the unification of the mov/mpegts DOVI parsing into one function, in a following patch. Most of the Matroska elements implementation was

Re: [FFmpeg-devel] [PATCH] avutil/utils: Remove racy check from avutil_version()

2021-09-26 Thread Andreas Rheinhardt
James Almer: > On 9/26/2021 6:46 AM, Andreas Rheinhardt wrote: >> avutil_version() currently performs several checks before >> just returning the version. There is a static int that aims >> to ensure that these tests are run only once. The reason is that >> there used to be a slightly expensive

Re: [FFmpeg-devel] [PATCH] avutil/utils: Remove racy check from avutil_version()

2021-09-26 Thread James Almer
On 9/26/2021 6:46 AM, Andreas Rheinhardt wrote: avutil_version() currently performs several checks before just returning the version. There is a static int that aims to ensure that these tests are run only once. The reason is that there used to be a slightly expensive check, but it has been

[FFmpeg-devel] [PATCH] avcodec/videotoolboxenc: Fixes non-B-Frame encoding

2021-09-26 Thread NoHalfBits
Sets vtctx->has_b_frames to 0 if the VideoToolbox compression session will not emit B-frames (and, in consequence, no valid DTSs). Required for the handling of invalid DTSs in 'vtenc_cm_to_avpacket' (line 2018ff) to work correctly and not abort encoding with "DTS is invalid." when no B-frames are

Re: [FFmpeg-devel] [PATCH 1] avfilter/vf_avgblur: switch to faster algorithm

2021-09-26 Thread myp...@gmail.com
On Sun, Sep 26, 2021 at 8:11 PM Paul B Mahol wrote: > > On Sun, Sep 26, 2021 at 1:27 PM myp...@gmail.com wrote: > > > On Sun, Sep 26, 2021 at 4:11 PM Paul B Mahol wrote: > > > > > > Signed-off-by: Paul B Mahol > > > --- > > > libavfilter/vf_avgblur.c | 311

Re: [FFmpeg-devel] [PATCH v1 1/1] avformat/amr: Return PATCHWELCOME on stereo files

2021-09-26 Thread myp...@gmail.com
On Thu, Sep 16, 2021 at 11:24 AM sunzhenliang wrote: > > Signed-off-by: sunzhenliang > --- > libavformat/amr.c | 22 ++ > 1 file changed, 18 insertions(+), 4 deletions(-) > > diff --git a/libavformat/amr.c b/libavformat/amr.c > index 836b276fd5..2762010ebe 100644 > ---

Re: [FFmpeg-devel] [PATCH 1] avfilter/vf_avgblur: switch to faster algorithm

2021-09-26 Thread Paul B Mahol
On Sun, Sep 26, 2021 at 1:27 PM myp...@gmail.com wrote: > On Sun, Sep 26, 2021 at 4:11 PM Paul B Mahol wrote: > > > > Signed-off-by: Paul B Mahol > > --- > > libavfilter/vf_avgblur.c | 311 ++ > > tests/ref/fate/filter-refcmp-psnr-yuv | 80 +++ > > 2

Re: [FFmpeg-devel] [PATCH v2 6/6] avcodec/libsvtav1: support constant quality mode

2021-09-26 Thread myp...@gmail.com
On Sat, Sep 25, 2021 at 8:36 PM Jan Ekström wrote: > > On Thu, Sep 23, 2021 at 6:08 PM wrote: > > > > On Thu, Sep 23, 2021 at 05:11:49PM +0300, Jan Ekström wrote: > > > On Thu, Sep 23, 2021 at 4:46 PM Christopher Degawa > > > wrote: > > > > > > > > On Sun, Sep 19, 2021 at 2:02 PM Christopher

Re: [FFmpeg-devel] [PATCH 1] avfilter/vf_avgblur: switch to faster algorithm

2021-09-26 Thread myp...@gmail.com
On Sun, Sep 26, 2021 at 4:11 PM Paul B Mahol wrote: > > Signed-off-by: Paul B Mahol > --- > libavfilter/vf_avgblur.c | 311 ++ > tests/ref/fate/filter-refcmp-psnr-yuv | 80 +++ > 2 files changed, 211 insertions(+), 180 deletions(-) > > diff --git

Re: [FFmpeg-devel] [PATCH v3 2/5] avformat/matroskadec: Parse dvcC/dvvC block additional mapping

2021-09-26 Thread myp...@gmail.com
On Sat, Sep 25, 2021 at 11:58 PM quietvoid wrote: > > The parsing was implemented in a new dovi_isom file for the > unification of the mov/mpegts DOVI parsing into one function, in a following > patch. > > Most of the Matroska elements implementation was done by Plex developers. > >

Re: [FFmpeg-devel] [PATCH 1/2] avutil/opt: Remove outdated version check

2021-09-26 Thread Paul B Mahol
lgtm ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 2/2] avutil/tests/opt: Set AVClass.version

2021-09-26 Thread Paul B Mahol
lgtm ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] avutil/utils: Remove racy check from avutil_version()

2021-09-26 Thread Paul B Mahol
lgtm ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH 2/2] avutil/tests/opt: Set AVClass.version

2021-09-26 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavutil/tests/opt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/tests/opt.c b/libavutil/tests/opt.c index 3134ffd354..e6ea892373 100644 --- a/libavutil/tests/opt.c +++ b/libavutil/tests/opt.c @@ -105,6 +105,7 @@ static const AVClass

[FFmpeg-devel] [PATCH 1/2] avutil/opt: Remove outdated version check

2021-09-26 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavutil/opt.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index f05283d610..c7001dbcd3 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1831,10 +1831,7 @@ int

[FFmpeg-devel] [PATCH] avutil/utils: Remove racy check from avutil_version()

2021-09-26 Thread Andreas Rheinhardt
avutil_version() currently performs several checks before just returning the version. There is a static int that aims to ensure that these tests are run only once. The reason is that there used to be a slightly expensive check, but it has been removed in 92e3a6fdac73f7e1d69d69717219a7538877d7a0.

Re: [FFmpeg-devel] [PATCH 1/3] avfilter/vf_swaprect: Use ff_formats_pixdesc_filter()

2021-09-26 Thread Paul B Mahol
lgtm ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 3/3] avfilter/formats: Avoid reallocations for video in ff_all_formats()

2021-09-26 Thread Nicolas George
Andreas Rheinhardt (12021-09-26): > Up until now, the list of pixfmts is reallocated every time an entry > is added to it; there are currently 196 pixel formats, so this matters: > It causes 5541704 calls to av_realloc_array() in a typical FATE run, > which is the majority for said function

[FFmpeg-devel] [PATCH 1] avfilter/vf_avgblur: switch to faster algorithm

2021-09-26 Thread Paul B Mahol
Signed-off-by: Paul B Mahol --- libavfilter/vf_avgblur.c | 311 ++ tests/ref/fate/filter-refcmp-psnr-yuv | 80 +++ 2 files changed, 211 insertions(+), 180 deletions(-) diff --git a/libavfilter/vf_avgblur.c b/libavfilter/vf_avgblur.c index

Re: [FFmpeg-devel] [PATCH] avformat/argo_asf: Use memcpy to copy string without its NUL

2021-09-26 Thread Andreas Rheinhardt
Zane van Iperen: > > > On 26/9/21 1:09 pm, Andreas Rheinhardt wrote: >> This avoids a -Wstringop-truncation warning from GCC which takes >> issue with the fact that the destination might not be NUL terminated. >> >> Signed-off-by: Andreas Rheinhardt >> --- >>   libavformat/argo_asf.c | 20

[FFmpeg-devel] [PATCH 6/6] avutil/hwcontext_qsv: Remove redundant check

2021-09-26 Thread Andreas Rheinhardt
It has already been checked immediately before that said AVDictionaryEntry exists; checking again is redundant. Furthermore, av_hwdevice_find_type_by_name() requires its argument to be non-NULL, so adding a codepath that automatically calls it with that parameter is nonsense. The same goes for the

[FFmpeg-devel] [PATCH 5/6] avutil/hwcontext_qsv: Fix leak of AVBuffer and AVBufferRef

2021-09-26 Thread Andreas Rheinhardt
This av_buffer_create() does nothing but leak an AVBuffer and an AVBufferRef (except on allocation error). Fixes Coverity issue 1491393. Signed-off-by: Andreas Rheinhardt --- libavutil/hwcontext_qsv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavutil/hwcontext_qsv.c

[FFmpeg-devel] [PATCH 4/6] avcodec/qsvenc: Combine multiple allocations

2021-09-26 Thread Andreas Rheinhardt
It makes the cleanup code smaller (and reduces the amount of allocations). Signed-off-by: Andreas Rheinhardt --- Better naming suggestions for the structures welcome. One could also stop using an av_fifo altogether and use an ordinary array (that is only allocated once) with FIFO semantics. Or

[FFmpeg-devel] [PATCH 3/6] avcodec/qsvenc: Properly flush the FIFO on close

2021-09-26 Thread Andreas Rheinhardt
Freeing the new H.264 specific fields has been forgotten. (This leak only appears in case the encoder has not been completely drained.) Signed-off-by: Andreas Rheinhardt --- libavcodec/qsvenc.c | 8 1 file changed, 8 insertions(+) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c

[FFmpeg-devel] [PATCH 2/6] avcodec/qsvenc: Fix leak of A53 data

2021-09-26 Thread Andreas Rheinhardt
Up until now, it has only been freed when the QSVFrame is reused, so that the last one contained in it leaked at the end. Signed-off-by: Andreas Rheinhardt --- libavcodec/qsvenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index

[FFmpeg-devel] [PATCH 1/6] avcodec/qsvenc: Fix leak and crash when encoding H.264 due to A53_CC

2021-09-26 Thread Andreas Rheinhardt
Since commit 3bbe0c210b05fc6fbd7b1d4bbd8479db7f2cf957, the Payloads array of every QSVFrame leaks as soon as the frame is reused; the leak is small and not very noticeable, but if there is an attempt to use said array the ensuing crash is much more noticeable. This happens when encoding H.264 with