av_log(ctx, level, "\n");
}
-static av_cold int init(AVFilterContext *ctx, const char *args, const AVClass *class)
+static av_cold int init(AVFilterContext *ctx, const char *args)
{
AssContext *ass = ctx->priv;
- static const char *shorthand[] = { "filename", NULL };
- int ret;
-
- ass->class = class;
- av_opt_set_defaults(ass);
-
- if ((ret = av_opt_set_from_string(ass, args, shorthand, "=", ":")) < 0)
- return ret;
if (!ass->filename) {
av_log(ctx, AV_LOG_ERROR, "No filename provided!\n");
{
AssContext *ass = ctx->priv;
- av_opt_free(ass);
if (ass->track)
ass_free_track(ass->track);
if (ass->renderer)
{ NULL }
};
+static const char *const shorthand[] = { "filename", NULL };
+
#if CONFIG_ASS_FILTER
static const AVOption ass_options[] = {
static av_cold int init_ass(AVFilterContext *ctx, const char *args)
{
AssContext *ass = ctx->priv;
- int ret = init(ctx, args, &ass_class);
+ int ret = init(ctx, args);
if (ret < 0)
return ret;
.inputs = ass_inputs,
.outputs = ass_outputs,
.priv_class = &ass_class,
+ .shorthand = shorthand,
};
#endif
AssContext *ass = ctx->priv;
/* Init libass */
- ret = init(ctx, args, &subtitles_class);
+ ret = init(ctx, args);
if (ret < 0)
return ret;
ass->track = ass_new_track(ass->library);
.inputs = ass_inputs,
.outputs = ass_outputs,
.priv_class = &subtitles_class,
+ .shorthand = shorthand,
};
#endif