mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
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
This commit is contained in:
parent
275516f87c
commit
3de684206e
@ -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->x_pexpr); dtext->x_pexpr = NULL;
|
||||||
av_expr_free(dtext->y_pexpr); dtext->y_pexpr = NULL;
|
av_expr_free(dtext->y_pexpr); dtext->y_pexpr = NULL;
|
||||||
|
|
||||||
av_freep(&dtext->fontfile);
|
av_freep(&dtext->boxcolor_string);
|
||||||
av_freep(&dtext->text);
|
|
||||||
av_freep(&dtext->expanded_text);
|
av_freep(&dtext->expanded_text);
|
||||||
av_freep(&dtext->fontcolor_string);
|
av_freep(&dtext->fontcolor_string);
|
||||||
av_freep(&dtext->boxcolor_string);
|
av_freep(&dtext->fontfile);
|
||||||
av_freep(&dtext->positions);
|
av_freep(&dtext->shadowcolor_string);
|
||||||
|
av_freep(&dtext->text);
|
||||||
av_freep(&dtext->x_expr);
|
av_freep(&dtext->x_expr);
|
||||||
av_freep(&dtext->y_expr);
|
av_freep(&dtext->y_expr);
|
||||||
|
|
||||||
|
av_freep(&dtext->positions);
|
||||||
dtext->nb_positions = 0;
|
dtext->nb_positions = 0;
|
||||||
av_freep(&dtext->shadowcolor_string);
|
|
||||||
av_tree_enumerate(dtext->glyphs, NULL, NULL, glyph_enu_free);
|
av_tree_enumerate(dtext->glyphs, NULL, NULL, glyph_enu_free);
|
||||||
av_tree_destroy(dtext->glyphs);
|
av_tree_destroy(dtext->glyphs);
|
||||||
dtext->glyphs = 0;
|
dtext->glyphs = NULL;
|
||||||
|
|
||||||
FT_Done_Face(dtext->face);
|
FT_Done_Face(dtext->face);
|
||||||
FT_Done_FreeType(dtext->library);
|
FT_Done_FreeType(dtext->library);
|
||||||
|
|
||||||
@ -424,7 +426,6 @@ static av_cold void uninit(AVFilterContext *ctx)
|
|||||||
av_freep(&dtext->box_line[i]);
|
av_freep(&dtext->box_line[i]);
|
||||||
dtext->pixel_step[i] = 0;
|
dtext->pixel_step[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int config_input(AVFilterLink *inlink)
|
static int config_input(AVFilterLink *inlink)
|
||||||
|
Loading…
Reference in New Issue
Block a user