Commit 3de68420 authored by Stefano Sabatini's avatar Stefano Sabatini

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
parent 275516f8
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment