diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2011-09-23 14:13:47 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2011-09-24 12:37:03 +0200 |
commit | 3de684206e940454a5276756620b794b0673d8b9 (patch) | |
tree | c0abec5f3792aa24d5470405fc61aab8032f314b | |
parent | 275516f87c80f5ff4ea1dcddd84bb354bda990f2 (diff) | |
download | ffmpeg-3de684206e940454a5276756620b794b0673d8b9.tar.gz |
vf_drawtext: perform misc cosmetics changes to uninit
In particular:
* lexically sort strings freeing commands
* logically group freeing instructions
* prefer NULL over 0 when setting dtext->glyphs
-rw-r--r-- | libavfilter/vf_drawtext.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 373dd70b86..888c99620e 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -403,20 +403,22 @@ static av_cold void uninit(AVFilterContext *ctx) av_expr_free(dtext->x_pexpr); dtext->x_pexpr = NULL; av_expr_free(dtext->y_pexpr); dtext->y_pexpr = NULL; - av_freep(&dtext->fontfile); - av_freep(&dtext->text); + av_freep(&dtext->boxcolor_string); av_freep(&dtext->expanded_text); av_freep(&dtext->fontcolor_string); - av_freep(&dtext->boxcolor_string); - av_freep(&dtext->positions); + av_freep(&dtext->fontfile); + av_freep(&dtext->shadowcolor_string); + av_freep(&dtext->text); av_freep(&dtext->x_expr); av_freep(&dtext->y_expr); + av_freep(&dtext->positions); dtext->nb_positions = 0; - av_freep(&dtext->shadowcolor_string); + av_tree_enumerate(dtext->glyphs, NULL, NULL, glyph_enu_free); av_tree_destroy(dtext->glyphs); - dtext->glyphs = 0; + dtext->glyphs = NULL; + FT_Done_Face(dtext->face); FT_Done_FreeType(dtext->library); @@ -424,7 +426,6 @@ static av_cold void uninit(AVFilterContext *ctx) av_freep(&dtext->box_line[i]); dtext->pixel_step[i] = 0; } - } static int config_input(AVFilterLink *inlink) |