In particular:
* lexically sort strings freeing commands
* logically group freeing instructions
* prefer NULL over 0 when setting dtext->glyphs
... | ... |
@@ -403,20 +403,22 @@ static av_cold void uninit(AVFilterContext *ctx) |
403 | 403 |
av_expr_free(dtext->x_pexpr); dtext->x_pexpr = NULL; |
404 | 404 |
av_expr_free(dtext->y_pexpr); dtext->y_pexpr = NULL; |
405 | 405 |
|
406 |
- av_freep(&dtext->fontfile); |
|
407 |
- av_freep(&dtext->text); |
|
406 |
+ av_freep(&dtext->boxcolor_string); |
|
408 | 407 |
av_freep(&dtext->expanded_text); |
409 | 408 |
av_freep(&dtext->fontcolor_string); |
410 |
- av_freep(&dtext->boxcolor_string); |
|
411 |
- av_freep(&dtext->positions); |
|
409 |
+ av_freep(&dtext->fontfile); |
|
410 |
+ av_freep(&dtext->shadowcolor_string); |
|
411 |
+ av_freep(&dtext->text); |
|
412 | 412 |
av_freep(&dtext->x_expr); |
413 | 413 |
av_freep(&dtext->y_expr); |
414 | 414 |
|
415 |
+ av_freep(&dtext->positions); |
|
415 | 416 |
dtext->nb_positions = 0; |
416 |
- av_freep(&dtext->shadowcolor_string); |
|
417 |
+ |
|
417 | 418 |
av_tree_enumerate(dtext->glyphs, NULL, NULL, glyph_enu_free); |
418 | 419 |
av_tree_destroy(dtext->glyphs); |
419 |
- dtext->glyphs = 0; |
|
420 |
+ dtext->glyphs = NULL; |
|
421 |
+ |
|
420 | 422 |
FT_Done_Face(dtext->face); |
421 | 423 |
FT_Done_FreeType(dtext->library); |
422 | 424 |
|
... | ... |
@@ -424,7 +426,6 @@ static av_cold void uninit(AVFilterContext *ctx) |
424 | 424 |
av_freep(&dtext->box_line[i]); |
425 | 425 |
dtext->pixel_step[i] = 0; |
426 | 426 |
} |
427 |
- |
|
428 | 427 |
} |
429 | 428 |
|
430 | 429 |
static int config_input(AVFilterLink *inlink) |