This ensures that needed arrays are always allocated and properly initialized.
Previously if code would use only avfilter_init_dict() to set options for filters
it would not allocate arrays for timeline processing thus it would crash if
user supplied enable option for filter(s).
count++;
}
- if (ctx->enable_str) {
- ret = set_enable_expr(ctx, ctx->enable_str);
- if (ret < 0)
- return ret;
- }
return count;
}
else if (ctx->filter->init_dict)
ret = ctx->filter->init_dict(ctx, options);
+ if (ctx->enable_str) {
+ ret = set_enable_expr(ctx, ctx->enable_str);
+ if (ret < 0)
+ return ret;
+ }
+
return ret;
}