* Re: [FFmpeg-devel] [PATCH] avfilter/drawtext: fix memory leak when using "reinit" runtime command
[not found] ` <YT3P288MB032913E67B0D3D3DA0DA4826E32C2@YT3P288MB0329.CANP288.PROD.OUTLOOK.COM>
@ 2025-01-17 22:35 ` Steven Zhou
0 siblings, 0 replies; 2+ messages in thread
From: Steven Zhou @ 2025-01-17 22:35 UTC (permalink / raw)
To: FFmpeg development discussions and patches
> Bump
A quick way to demonstrate the memleak:
```
./configure --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz make -j `nproc valgrind --leak-check=full ./ffmpeg -nostdin -y -f lavfi \ -i testsrc=size=640x360:rate=10 -filter_complex \
"[0:v]format=yuv420p,sendcmd=c='0.5 drawtext reinit \\\'text=five\\\'',drawtext=text=zero:\
x=(w-text_w)/2:y=(h-text_h)/2:fontsize=30:fontcolor=white@0.8[vout]" \ -map "[vout]" -t 1 output.y4m ``` -StevenZ
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avfilter/drawtext: fix memory leak when using "reinit" runtime command
[not found] <YT3P288MB0329C50F0BC8B773573868C1E32C2@YT3P288MB0329.CANP288.PROD.OUTLOOK.COM>
[not found] ` <YT3P288MB032913E67B0D3D3DA0DA4826E32C2@YT3P288MB0329.CANP288.PROD.OUTLOOK.COM>
@ 2025-01-17 23:35 ` James Almer
1 sibling, 0 replies; 2+ messages in thread
From: James Almer @ 2025-01-17 23:35 UTC (permalink / raw)
To: ffmpeg-devel
[-- Attachment #1.1.1: Type: text/plain, Size: 789 bytes --]
On 11/22/2024 10:20 PM, Steven Zhou wrote:
> Free AVOption in drawtext private context when freeing old copy of drawtext
> private context during processing of "reinit" runtime command.
>
> Signed-off-by: Steven Zhou <steven.zhou@netint.ca>
> ---
> libavfilter/vf_drawtext.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
> index 8de24625d6..038646b112 100644
> --- a/libavfilter/vf_drawtext.c
> +++ b/libavfilter/vf_drawtext.c
> @@ -1226,6 +1226,7 @@ static int command(AVFilterContext *ctx, const char *cmd, const char *arg, char
>
> ctx->priv = old;
> uninit(ctx);
> + av_opt_free(old);
> av_freep(&old);
>
> ctx->priv = new;
Will apply.
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-17 23:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <YT3P288MB0329C50F0BC8B773573868C1E32C2@YT3P288MB0329.CANP288.PROD.OUTLOOK.COM>
[not found] ` <YT3P288MB032913E67B0D3D3DA0DA4826E32C2@YT3P288MB0329.CANP288.PROD.OUTLOOK.COM>
2025-01-17 22:35 ` [FFmpeg-devel] [PATCH] avfilter/drawtext: fix memory leak when using "reinit" runtime command Steven Zhou
2025-01-17 23:35 ` James Almer
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git