| @@ -45,11 +45,11 @@ typedef struct { · 44 unmodified lines |
| 45 | 45 | #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
| 46 | 46 | |
| 47 | 47 | static const AVOption asetnsamples_options[] = { |
| 48 | | −{ "pad", "pad last frame with zeros", OFFSET(pad), AV_OPT_TYPE_INT, {.i64=1}, 0, 1, FLAGS }, |
| 49 | | −{ "p", "pad last frame with zeros", OFFSET(pad), AV_OPT_TYPE_INT, {.i64=1}, 0, 1, FLAGS }, |
| 50 | | −{ "nb_out_samples", "set the number of per-frame output samples", OFFSET(nb_out_samples), AV_OPT_TYPE_INT, {.i64=1024}, 1, INT_MAX, FLAGS }, |
| 51 | | −{ "n", "set the number of per-frame output samples", OFFSET(nb_out_samples), AV_OPT_TYPE_INT, {.i64=1024}, 1, INT_MAX, FLAGS }, |
| 52 | | −{ NULL } |
| 48 | + { "nb_out_samples", "set the number of per-frame output samples", OFFSET(nb_out_samples), AV_OPT_TYPE_INT, {.i64=1024}, 1, INT_MAX, FLAGS }, |
| 49 | + { "n", "set the number of per-frame output samples", OFFSET(nb_out_samples), AV_OPT_TYPE_INT, {.i64=1024}, 1, INT_MAX, FLAGS }, |
| 50 | + { "pad", "pad last frame with zeros", OFFSET(pad), AV_OPT_TYPE_INT, {.i64=1}, 0, 1, FLAGS }, |
| 51 | + { "p", "pad last frame with zeros", OFFSET(pad), AV_OPT_TYPE_INT, {.i64=1}, 0, 1, FLAGS }, |
| 52 | + { NULL } |
| 53 | 53 | }; |
| 54 | 54 | |
| 55 | 55 | AVFILTER_DEFINE_CLASS(asetnsamples); |
| @@ -57,13 +57,6 @@ AVFILTER_DEFINE_CLASS(asetnsamples); · 1 unmodified line |
| 57 | 57 | static av_cold int init(AVFilterContext *ctx, const char *args) |
| 58 | 58 | { |
| 59 | 59 | ASNSContext *asns = ctx->priv; |
| 60 | | − int err; |
| 61 | | − |
| 62 | | − asns->class = &asetnsamples_class; |
| 63 | | − av_opt_set_defaults(asns); |
| 64 | | − |
| 65 | | − if ((err = av_set_options_string(asns, args, "=", ":")) < 0) |
| 66 | | − return err; |
| 67 | 60 | |
| 68 | 61 | asns->next_out_pts = AV_NOPTS_VALUE; |
| 69 | 62 | av_log(ctx, AV_LOG_VERBOSE, "nb_out_samples:%d pad:%d\n", asns->nb_out_samples, asns->pad); |