static int query_formats(AVFilterContext *ctx)
{
- ff_set_common_formats(ctx, ff_draw_supported_pixel_formats(0));
- return 0;
+ return ff_set_common_formats(ctx, ff_draw_supported_pixel_formats(0));
}
static int glyph_enu_free(void *opaque, void *elem)
int ret;
if (s->reload) {
- if ((ret = load_textfile(ctx)) < 0)
+ if ((ret = load_textfile(ctx)) < 0) {
+ av_frame_free(&frame);
return ret;
+ }
#if CONFIG_LIBFRIBIDI
if (s->text_shaping)
- if ((ret = shape_text(ctx)) < 0)
+ if ((ret = shape_text(ctx)) < 0) {
+ av_frame_free(&frame);
return ret;
+ }
#endif
}