[FFmpeg-devel] [PATCH] avfilter/drawtext: fix memory leak when using "reinit" runtime command

Steven Zhou steven.zhou at netint.ca
Sat Nov 23 03:28:11 EET 2024


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 at 0.8[vout]" \
-map "[vout]" -t 1 output.y4m
```
-StevenZ



More information about the ffmpeg-devel mailing list