[FFmpeg-devel] Autotools full recompilation

2017-08-24 Thread Yan
High! I'm using latest ffmpeg from this mirror (https://github.com/FFmpeg) I was building it with different options: ./configure ./configure --libdir=$dev/FFmpeg/libavcodec/ ./configure --enable-shared ./configure --enable-shared --enable-pic And after each time the whole project got recompi

[FFmpeg-devel] [PATCH] libavcodec/vp9: fix ref-frame size judging method

2019-04-29 Thread Yan Cen
From: Yan Cen There is no need all reference frame demension is valid in libvpx. So this change contains three part: 1. Change each judgement's loglevel from "ERROR" to "WARNING" 2. Make sure at least one of frames that this frame references has valid dimension. 3.

[FFmpeg-devel] [PATCH v2] libavcodec/vp9: fix ref-frame size judging method

2019-05-19 Thread Yan Cen
All judgements fail would report "ERROR". Signed-off-by: Xiang Haihao Signed-off-by: Li Zhong Signed-off-by: Yan Cen --- libavcodec/vp9.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index acf3ffc..849c1a6

[FFmpeg-devel] [PATCH] libavcodec/vp9: Fix VP9 dynamic resolution changing decoding on VAAPI.

2019-05-27 Thread Yan Wang
When the format change, the VAAPI context cannot be destroyed. Otherwise, the reference frame surface will lost. Signed-off-by: Yan Wang --- libavcodec/decode.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 6c31166ec2..3eda1dc42c

Re: [FFmpeg-devel] [PATCH] libavcodec/vp9: Fix VP9 dynamic resolution changing decoding on VAAPI.

2019-05-28 Thread Yan Wang
On 5/28/2019 3:16 PM, Hendrik Leppkes wrote: On Tue, May 28, 2019 at 8:57 AM Yan Wang wrote: When the format change, the VAAPI context cannot be destroyed. Otherwise, the reference frame surface will lost. Signed-off-by: Yan Wang --- libavcodec/decode.c | 6 ++ 1 file changed, 6

Re: [FFmpeg-devel] [PATCH] libavcodec/vp9: Fix VP9 dynamic resolution changing decoding on VAAPI.

2019-05-28 Thread Yan Wang
On 5/28/2019 4:43 PM, Hendrik Leppkes wrote: On Tue, May 28, 2019 at 9:46 AM Yan Wang wrote: On 5/28/2019 3:16 PM, Hendrik Leppkes wrote: On Tue, May 28, 2019 at 8:57 AM Yan Wang wrote: When the format change, the VAAPI context cannot be destroyed. Otherwise, the reference frame surface

Re: [FFmpeg-devel] [PATCH] libavcodec/vp9: Fix VP9 dynamic resolution changing decoding on VAAPI.

2019-05-30 Thread Yan Wang
On 5/30/2019 7:39 AM, Mark Thompson wrote: On 28/05/2019 08:46, Yan Wang wrote: On 5/28/2019 3:16 PM, Hendrik Leppkes wrote: On Tue, May 28, 2019 at 8:57 AM Yan Wang wrote: When the format change, the VAAPI context cannot be destroyed. Otherwise, the reference frame surface will lost

Re: [FFmpeg-devel] [PATCH 2/2] lavc/vaapi_decode: recreate hw_frames_ctx without destroy va_context

2019-07-07 Thread Yan Wang
which is AVFrame in fact and pass them into libva when re-creating new va_context. Thanks. Yan Wang As libva allows re-create surface separately without changing the context, this issue could be handled by only recreating hw_frames_ctx. Could be verified by: ffmpeg -hwaccel vaapi -hwa

Re: [FFmpeg-devel] [PATCH 2/2] lavc/vaapi_decode: recreate hw_frames_ctx without destroy va_context

2019-07-08 Thread Yan Wang
On 7/8/2019 2:45 PM, Yan Wang wrote: On 7/7/2019 9:49 PM, Fu, Linjie wrote: -Original Message- From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of Mark Thompson Sent: Sunday, July 7, 2019 19:51 To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH 2/2

[FFmpeg-devel] [PATCH v3] libavcodec/vp9: fix ref-frame size judging method

2019-07-08 Thread Yan Cen
All judgements fail would report "ERROR". Signed-off-by: Xiang Haihao Signed-off-by: Li Zhong Signed-off-by: Yan Cen --- libavcodec/vp9.c | 51 +++ 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/libavcodec/vp9.c b/libavcodec/

[FFmpeg-devel] Help mixing live audio streams

2016-11-23 Thread Yan Brenman
All FFMPEG gurus! Can somebody please suggest a format of FFMPEG command to mix several audio live streams on Windows. Let my just make it very clear - live audio streams and not existing audio files. Just to put it in the context - lets say audio stream from the microphone and Stereo Mix. With s

[FFmpeg-devel] [PATCH] mpeg2_metadata: support inverse (soft) telecine

2020-12-29 Thread Tom Yan
Signed-off-by: Tom Yan --- doc/bitstream_filters.texi | 5 + libavcodec/mpeg2_metadata_bsf.c | 30 ++ 2 files changed, 35 insertions(+) diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi index 8a2f55cc41..7831abc120 100644 --- a/doc

[FFmpeg-devel] [PATCH v2] mpeg2_metadata: support inverse (soft) telecine

2020-12-30 Thread Tom Yan
Signed-off-by: Tom Yan --- doc/bitstream_filters.texi | 6 ++ libavcodec/mpeg2_metadata_bsf.c | 27 +++ 2 files changed, 33 insertions(+) diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi index 8a2f55cc41..7e178a6912 100644 --- a/doc

[FFmpeg-devel] [PATCH] avformat/wavenc: allow WAVEFORMATEXTENSIBLE to be suppressed

2021-12-27 Thread Tom Yan
s" to be suppressed and the format tag field to be set to WAVE_FORMAT_PCM (0x0001) for audio with sample size higher than 16 (or sample rate higher than 48000). Signed-off-by: Tom Yan --- libavformat/riff.h| 5 + libavformat/riffenc.c | 4 ++-- libavformat/wavenc.c | 5 - 3 fil

[FFmpeg-devel] [PATCH] avformat/wavenc: allow WAVEFORMATEXTENSIBLE to be suppressed

2022-01-23 Thread Tom Yan
s" to be suppressed and the format tag field to be set to WAVE_FORMAT_PCM (0x0001) for audio with sample size higher than 16 (or sample rate higher than 48000). Signed-off-by: Tom Yan --- libavformat/riff.h| 5 + libavformat/riffenc.c | 4 ++-- libavformat/wavenc.c | 5 - 3 fil

[FFmpeg-devel] [PATCH] mpegvideo_parser: check picture_structure for field order

2022-02-05 Thread Tom Yan
the top_field_first bit is only used to indicate the field order when the picture is a frame picture (which consists of two fields) but not when it is a field picture (which consists of one single top or bottom field). Signed-off-by: Tom Yan --- libavcodec/mpegvideo_parser.c | 7 +-- 1 file

Re: [FFmpeg-devel] [PATCH] mpegvideo_parser: check picture_structure for field order

2022-02-05 Thread Tom Yan
RESSIVE when (processive_sequence == 0 and progressive_frame == 1), there's not really a point to check processive_sequence at all. On Sat, 5 Feb 2022 at 20:51, Tom Yan wrote: > > the top_field_first bit is only used to indicate the field order > when the picture is a frame picture (which consist

[FFmpeg-devel] [PATCH v2] mpegvideo_parser: check picture_structure for field order

2022-02-05 Thread Tom Yan
to be 0 if progressive_frame is 0 on any picture in the sequence). Signed-off-by: Tom Yan --- libavcodec/mpegvideo_parser.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c index c5dc867d24

Re: [FFmpeg-devel] [PATCH v2] mpegvideo_parser: check picture_structure for field order

2022-02-06 Thread Tom Yan
r. If you insist on making it more clumsy and silly, I can resend. On Sun, 6 Feb 2022 at 13:46, Andreas Rheinhardt wrote: > > Tom Yan: > > the top_field_first bit is only used to indicate the field order > > when the picture is a frame picture (which consists of two fields) &g

[FFmpeg-devel] [PATCH v3] mpegvideo_parser: check picture_structure for field order

2022-02-06 Thread Tom Yan
the top_field_first bit is only used to indicate the field order when the picture is a frame picture (which consists of two fields) but not when it is a field picture (which consists of one single top or bottom field). Signed-off-by: Tom Yan --- libavcodec/mpegvideo_parser.c | 15

[FFmpeg-devel] [PATCH] avformat/riffdec: fix support for WAVEFORMAT

2022-07-25 Thread Tom Yan
WAVEFORMAT can be used for 16-bit PCM as well. Signed-off-by: Tom Yan --- libavformat/riffdec.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c index 3946ecb72f..8289438f08 100644 --- a/libavformat/riffdec.c +++ b

Re: [FFmpeg-devel] [PATCH] libavformat/dashdec: Fix buffer overflow in segment URL resolution

2025-04-15 Thread jing yan
Thanks for the review! that can't be null and I found another mistake. I will fix this issue and send a v2 patch soon. Michael Niedermayer 于2025年4月16日周三 07:33写道: > Hi > > On Fri, Apr 11, 2025 at 03:48:08PM +0800, xiaohuan...@gmail.com wrote: > > From: xiaohuanshu > > > > Problem: > > The max_ur

Re: [FFmpeg-devel] [PATCH v3] libavformat/dashdec: Fix buffer overflow in segment URL resolution

2025-05-14 Thread jing yan
Hi, just a gentle ping on this patch. Let me know if anything else is needed. Thanks! 于2025年4月16日周三 14:56写道: > From: xiaohuanshu > > Problem: > The max_url_size calculation for DASH segment URLs only considered the > base URL > length, leading to buffer overflow when the segment's sourceURL

[FFmpeg-devel] [PATCH 0/4] fix multiple memory leaks

2025-06-17 Thread Lidong Yan
+MlJ7wQDAQgHiHgEGBYKACAWIQQCzskBcOehk1y8GoKZR31bPD+6owUCaEpkmQIb DAAKCRCZR31bPD+6ozWxAQC9OFisWrP/hHXUfj8AnC39r5pf5fEBz7lHvFgWNk2b XwD7Bl6kvIIW7ReqtgXvcl7u78vEo+e9YeTGTlmAogjpeQk= =rP+W -END PGP PUBLIC KEY BLOCK- Lidong Yan (4): libavformat/rtmpproto: fix rmtp packet leak in gen_connect

[FFmpeg-devel] [PATCH 4/4] avformat/sapenc: fix leak in sap_write_header()

2025-06-17 Thread Lidong Yan
In sap_write_header(), ff_format_set_url() assign new allocated new_url to contexts[i]->url but forgot to free it later. Add two loops to free contexts[i]->url before av_free(context). Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavformat/sapenc.c | 6 ++ 1

[FFmpeg-devel] [PATCH 2/4] avfilter/asrc_sinc: fix leak in config_input()

2025-06-17 Thread Lidong Yan
In config_input(), fir_to_phase() allocates memory in h[longer]. But if av_calloc() to s->coeffs failed, memory in h[longer] would leak. Add av_free(h[longer]) in !s->coeffs path. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavfilter/asrc_sinc.c | 4 +++- 1 fil

[FFmpeg-devel] [PATCH 1/4] libavformat/rtmpproto: fix rmtp packet leak in gen_connect()

2025-06-17 Thread Lidong Yan
In libavformat/rtmpproto.c:gen_connect(), if check on string length or check on codec fourcc failed, ff_rtmp_packet_create() allocated data in pkt would leak. Add ff_rtmp_packet_destory before return error code. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libav

[FFmpeg-devel] [PATCH 3/4] avformat/sbgdec: fix leak in sbg_read_header()

2025-06-17 Thread Lidong Yan
In sbg_read_header(), if avformat_new_stream() failed, it returns without cleanup, which may cause memory leaks. Replace return statement with goto so that we would first clean up then return. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavformat/sbgdec.c | 6 --

[FFmpeg-devel] [PATCH] avformat/rtmpproto: fix rmtp packet leak in gen_connect()

2025-06-14 Thread Lidong Yan
In libavformat/rtmpproto.c:gen_connect(), if check on string length or check on codec fourcc failed, ff_rtmp_packet_create() allocated data in pkt would leak. Add ff_rtmp_packet_destory before return error code. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> -BEGIN PGP PUBL

[FFmpeg-devel] [PATCH 0/2] fix multiple memory leaks

2025-06-25 Thread Lidong Yan
DAAKCRCZR31bPD+6ozWxAQC9OFisWrP/hHXUfj8AnC39r5pf5fEBz7lHvFgWNk2b XwD7Bl6kvIIW7ReqtgXvcl7u78vEo+e9YeTGTlmAogjpeQk= =rP+W -END PGP PUBLIC KEY BLOCK- Lidong Yan (2): avfilter/asrc_sinc: fix leak in config_input() avformat/sapenc: fix leak in sap_write_header() libavfilter/asrc_sinc.c | 4

[FFmpeg-devel] [PATCH 2/2] avformat/sapenc: fix leak in sap_write_header()

2025-06-25 Thread Lidong Yan
normal execution can fall through cleanup code. Since normal code execution now go through code after fail label, replace fail label with cleanup label. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavformat/sapenc.c | 35 +++ 1 file changed, 1

Re: [FFmpeg-devel] [PATCH 2/2] avformat/sapenc: fix leak in sap_write_header()

2025-06-28 Thread Lidong Yan
Michael Niedermayer writes: > please do the rename in a seperate patch > so there are 2 patches, this makes the changes clearer > Got it. Thanks for your review. Lidong ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/li

[FFmpeg-devel] [PATCH 4/4] avformat/iamf_writer: fix leaks of avio_open_dyn_buf() allocated memory

2025-06-27 Thread Lidong Yan
cleanup code to free dyn_bc. Do the same thing for iamf_write_audio_element() and write_parameter_block(). Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavformat/iamf_writer.c | 47 +-- 1 file changed, 30 insertions(+), 17 deletions(-)

[FFmpeg-devel] [PATCH 2/4] avcodec/vorbisenc: fix leak if av_mallocz failed

2025-06-27 Thread Lidong Yan
In put_main_header(), av_mallocz() allocates memory to local variable buffer, buffer leaks if av_mallocz() to *out failed. Add av_free(buffer) before return error code. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavcodec/vorbisenc.c | 4 +++- 1 file changed, 3 inse

[FFmpeg-devel] [PATCH 1/4] avformat/movenc: fix multiple leaks in error paths

2025-06-27 Thread Lidong Yan
Add av_free(sgpd_entries) before return. In mov_write_track_udta_tag(), avio_open_dyn_buf() allocates a buffer, and this buffer leaks if mov_write_track_kinds() failed. Add cleanup code and goto cleanup if error happened. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- li

[FFmpeg-devel] [PATCH 0/4] fix leaks in movenc, vorbisenc, lut3d and iamf_writer

2025-06-27 Thread Lidong Yan
Fix multiple leaks in error paths. Simply add av_free() in error path or replace return AVERROR* with goto cleanup to prevent from leaks. Lidong Yan (4): avformat/movenc: fix multiple leaks in error paths avcodec/vorbisenc: fix leak if av_mallocz failed avfilter/vf_lut3d: fix leak if

[FFmpeg-devel] [PATCH 3/4] avfilter/vf_lut3d: fix leak if allocate_3dlut failed

2025-06-27 Thread Lidong Yan
In parse_cinespace(), memory allocated in in_prelut[] and out_prelut[] would leak if allocate_3dlut() failed. Replace return ret with goto end to free memory before return error code. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavfilter/vf_lut3d.c | 2 +- 1 file chan

[FFmpeg-devel] [PATCH v2 2/3] avformat/iamf_writer: fix leaks of avio_open_dyn_buf() allocated memory

2025-07-09 Thread Lidong Yan
cleanup code to free dyn_bc. Do the same thing for iamf_write_audio_element() and write_parameter_block(). Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavformat/iamf_writer.c | 47 +-- 1 file changed, 30 insertions(+), 17 deletions(-)

[FFmpeg-devel] [PATCH v2 3/3] swscale/graph: fix leak in adapt_colors()

2025-07-09 Thread Lidong Yan
In adapt_colors(), ff_sws_lut3d_generate() allocates memory in lut. However if add_legacy_sws_pass() failed, lut leaks. free lut before return ret. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libswscale/graph.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

[FFmpeg-devel] [PATCH v2 0/3] resend fixes for leaks

2025-07-09 Thread Lidong Yan
lmAogjpeQk= =rP+W -END PGP PUBLIC KEY BLOCK- Lidong Yan (3): avformat/sapenc: fix leak in sap_write_header() avformat/iamf_writer: fix leaks of avio_open_dyn_buf() allocated memory swscale/graph: fix leak in adapt_colors() libavformat/iamf_wri

[FFmpeg-devel] [PATCH v2 1/3] avformat/sapenc: fix leak in sap_write_header()

2025-07-09 Thread Lidong Yan
normal execution can fall through fail code. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavformat/sapenc.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c index 87a834a8d8..0567a754e2 100644 --- a

Re: [FFmpeg-devel] [PATCH v2 1/3] avformat/sapenc: fix leak in sap_write_header()

2025-07-12 Thread Lidong Yan
Michael Niedermayer write: > On Thu, Jul 10, 2025 at 10:20:45AM +0800, Lidong Yan wrote: > > In sap_write_header(), ff_format_set_url() assign new allocated new_url > > to contexts[i]->url but forgot to free it later. Add for loop to free > > contexts[i]->url before a

[FFmpeg-devel] [PATCH 1/2] avfilter/asrc_sinc: fix leak in config_input()

2025-06-25 Thread Lidong Yan
to_phase() failed, which in turn means that memory in h[longer] has not been allocated yet. To fix this leak, add av_free(h[longer]) in av_calloc() failed branch would be enough. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavfilter/asrc_sinc.c | 4 +++- 1 file changed, 3 in

Re: [FFmpeg-devel] [PATCH v4 2/3] avformat/sapenc: fix leak in sap_write_header()

2025-07-06 Thread Lidong Yan
Michael Niedermayer writes: > > contexts will be NULL so i would assume contexts[i] will segfault > > thx > Sorry and you are right. Gonna fix. Thanks, Lidong ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ff

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/utvideodec: fix leaks in decode_plane() and decode_plane10()

2025-06-29 Thread Lidong Yan
Michael Niedermayer writes: > This is not correct > > build_huff() does not set these when fsym >= 0 > > your patch runs free() on random uninitialized variables > > before submitting memleak fixes, please verify that > 1. there is actually a leak > 2. your patch does not introduce a new anomaly

[FFmpeg-devel] [PATCH v4 0/3] fix leak in avfilter/asrc_sinc and avformat/sapenc

2025-06-30 Thread Lidong Yan
+6ozWxAQC9OFisWrP/hHXUfj8AnC39r5pf5fEBz7lHvFgWNk2b XwD7Bl6kvIIW7ReqtgXvcl7u78vEo+e9YeTGTlmAogjpeQk= =rP+W -END PGP PUBLIC KEY BLOCK- Lidong Yan (3): avfilter/asrc_sinc: fix leak in config_input() avformat/sapenc: fix leak in sap_write_header() avformat/sapenc: reword fail to cleanup in

[FFmpeg-devel] [PATCH v4 1/3] avfilter/asrc_sinc: fix leak in config_input()

2025-06-30 Thread Lidong Yan
ith goto cleanup to prevent from leaks. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavfilter/asrc_sinc.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/libavfilter/asrc_sinc.c b/libavfilter/asrc_sinc.c index 6ff3303316..05cf53fe

[FFmpeg-devel] [PATCH v4 2/3] avformat/sapenc: fix leak in sap_write_header()

2025-06-30 Thread Lidong Yan
normal execution can fall through cleanup code. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavformat/sapenc.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c index 87a834a8d8..0882690ba5 100644 --- a/libavfor

[FFmpeg-devel] [PATCH v4 3/3] avformat/sapenc: reword fail to cleanup in sap_write_header()

2025-06-30 Thread Lidong Yan
In sap_write_header(), normal execution would fall through to fail labeled code, thus cleanup would be a better name compared to fail. Replace the use of fail label with cleanup label. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavformat/sapenc.

[FFmpeg-devel] [PATCH v3 2/2] bloom: optimize multiple pathspec items in revision traversal

2025-06-27 Thread Lidong Yan
_info. Add new test cases in t/t4216-log-bloom.sh to ensure - consistent results between the optimization for multiple pathspec items using bloom filter and the case without bloom filter optimization. - does not use bloom filter if any pathspec item is not literal. Signed-off-by: Lidon

[FFmpeg-devel] [PATCH v3 1/2] bloom: replace struct bloom_key * with struct bloom_keyvec

2025-06-27 Thread Lidong Yan
() is added to initialize a key in keyvec. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- bloom.c| 31 +++ bloom.h| 20 revision.c | 36 ++-- revision.h | 6 +++--- 4 files changed, 72 inse

[FFmpeg-devel] [PATCH v3 0/2] bloom: enable bloom filter optimization for multiple pathspec elements in revision traversal

2025-06-27 Thread Lidong Yan
This series enables bloom filter optimization for multiple pathspec elements. Compared to v2, v3 fixed bugs in forbid_bloom_filter() and add one more test case in t/t4216-log-bloom.sh. Lidong Yan (2): bloom: replace struct bloom_key * with struct bloom_keyvec bloom: optimize multiple pathspec

Re: [FFmpeg-devel] [PATCH v3 2/2] bloom: optimize multiple pathspec items in revision traversal

2025-06-27 Thread Lidong Yan
Sorry, I filled in the wrong recipient address. Please forgive me and ignore this email. ___ 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-devel] [PATCH 0/5] fix multiple memory leaks

2025-06-28 Thread Lidong Yan
+6ozWxAQC9OFisWrP/hHXUfj8AnC39r5pf5fEBz7lHvFgWNk2b XwD7Bl6kvIIW7ReqtgXvcl7u78vEo+e9YeTGTlmAogjpeQk= =rP+W -END PGP PUBLIC KEY BLOCK- Lidong Yan (5): avcodec/utvideodec: fix leaks in decode_plane() and decode_plane10() avformat/rtpdec_latm: fix leak in parse_fmtp_config() swscale/graph: fix

[FFmpeg-devel] [PATCH 1/5] avcodec/utvideodec: fix leaks in decode_plane() and decode_plane10()

2025-06-28 Thread Lidong Yan
-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavcodec/utvideodec.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c index 4c0fa2ca67..f15d623462 100644 --- a/libavcodec/utvideodec.c +++ b/libavcodec/utvide

[FFmpeg-devel] [PATCH 2/5] avformat/rtpdec_latm: fix leak in parse_fmtp_config()

2025-06-28 Thread Lidong Yan
av_mallocz() allocates memory in config, but we forget to free it if init_get_bits() failed. Replace return ret with goto end. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavformat/rtpdec_latm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libav

[FFmpeg-devel] [PATCH 0/5] fix multiple memory leaks

2025-06-28 Thread Lidong Yan
This patch series fix multiple memory leaks in error path and early return point. Lidong Yan (5): avcodec/utvideodec: fix leaks in decode_plane() and decode_plane10() avformat/rtpdec_latm: fix leak in parse_fmtp_config() swscale/graph: fix leak in adapt_colors() avcodec/sunrast: fix leak

[FFmpeg-devel] [PATCH 3/5] swscale/graph: fix leak in adapt_colors()

2025-06-28 Thread Lidong Yan
In adapt_colors(), ff_sws_lut3d_generate() allocates memory in lut. However if add_legacy_sws_pass() failed, lut leaks. free lut before return ret. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libswscale/graph.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

[FFmpeg-devel] [PATCH 4/5] avcodec/sunrast: fix leak in sunrast_decode_frame()

2025-06-28 Thread Lidong Yan
In sunrast_decode_frame(), we use av_malloc_array() allocates memory to ptr and ptr2. However if buf_end - buf < 1, this function returns error code without freeing this memory thus cause a leak. Add av_freep() before return. Signed-off-by: Lidong Yan <502024330...@smail.nju.

[FFmpeg-devel] [PATCH 5/5] avformat/rtpdec_asf: fix leak in ff_wms_parse_sdp_a_line()

2025-06-28 Thread Lidong Yan
In ff_wms_parse_sdp_a_line(), it allocates memory in buf, but doesn't free buf when avformat_alloc_context() failed. Add av_free(buf) before return to prevent from leak. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> --- libavformat/rtpdec_asf.c | 4 +++- 1 file changed, 3

Re: [FFmpeg-devel] [PATCH 2/4] avfilter/asrc_sinc: fix leak in config_input()

2025-06-28 Thread Lidong Yan
Michael Niedermayer writes: > failure of av_tx_init() with your patch results in a leak: > I send a new patch in https://ffmpeg.org/pipermail/ffmpeg-devel/2025-June/345932.html ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/ma

Re: [FFmpeg-devel] [PATCH 2/4] avfilter/asrc_sinc: fix leak in config_input()

2025-06-27 Thread Lidong Yan
Michael Niedermayer wrote: > failure of av_tx_init() with your patch results in a leak: > > ==3653806== 1,260 bytes in 1 blocks are definitely lost in loss record 6 > of 14 > ==3653806==at 0x483E0F0: memalign (in > /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) > ==3653

[FFmpeg-devel] [PATCH v3] avfilter/asrc_sinc: fix leak in config_input()

2025-06-28 Thread Lidong Yan
ith goto cleanup to prevent from leaks. Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn> -BEGIN PGP PUBLIC KEY BLOCK- mDMEaEpkmRYJKwYBBAHaRw8BAQdAGwGqH/Dwod+i6kR0/Rhn5GanJ7wK8mM9tWP/ W2qu8Ti0HTUwMjAyNDMzMDA1NkBzbWFpbC5uanUuZWR1LmNuiJkEExYKAEEWIQQC zskBcOehk1y8G

Re: [FFmpeg-devel] [PATCH v3] avfilter/asrc_sinc: fix leak in config_input()

2025-06-29 Thread Lidong Yan
Michael Niedermayer writes: > > +cleanup: > > +av_free(h[longer]); > > return 0; > > this is not the correct return code > Sorry about that, gonna fix. Thanks, Lidong ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/ma