[FFmpeg-cvslog] vf_drawtext: fix memory leak of glyph data.

Nicolas George git at videolan.org
Tue Apr 10 15:45:01 CEST 2012


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Tue Apr 10 09:55:11 2012 +0200| [423047ea3167db5dc7d7b69165e1930710adb878] | committer: Nicolas George

vf_drawtext: fix memory leak of glyph data.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=423047ea3167db5dc7d7b69165e1930710adb878
---

 libavfilter/vf_drawtext.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 1d9a858..35f6068 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -416,6 +416,10 @@ static int query_formats(AVFilterContext *ctx)
 
 static int glyph_enu_free(void *opaque, void *elem)
 {
+    Glyph *glyph = elem;
+
+    FT_Done_Glyph(*glyph->glyph);
+    av_freep(&glyph->glyph);
     av_free(elem);
     return 0;
 }



More information about the ffmpeg-cvslog mailing list