Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-06-22 16:33:09 +0400
committerStefano Sabatini <stefasab@gmail.com>2012-06-23 01:11:43 +0400
commitc17808cebd2b9cf734dfa7f652ed49a3b3289386 (patch)
tree809dfdeee9db61d718252717b8f21f423e067417 /libavfilter/af_asetnsamples.c
parent012aa12a6bff8333da2165256bae312f6844ab65 (diff)
lavfi: define macro AVFILTER_DEFINE_CLASS
The macro can be used to define consistently the internal class of a filter, save some typing and factorize.
Diffstat (limited to 'libavfilter/af_asetnsamples.c')
-rw-r--r--libavfilter/af_asetnsamples.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/libavfilter/af_asetnsamples.c b/libavfilter/af_asetnsamples.c
index 73ed5344a9..b373fc254e 100644
--- a/libavfilter/af_asetnsamples.c
+++ b/libavfilter/af_asetnsamples.c
@@ -29,6 +29,7 @@
#include "libavutil/opt.h"
#include "avfilter.h"
#include "audio.h"
+#include "internal.h"
#include "formats.h"
typedef struct {
@@ -42,7 +43,7 @@ typedef struct {
#define OFFSET(x) offsetof(ASNSContext, x)
-static const AVOption asns_options[] = {
+static const AVOption asetnsamples_options[] = {
{ "pad", "pad last frame with zeros", OFFSET(pad), AV_OPT_TYPE_INT, {.dbl=1}, 0, 1 },
{ "p", "pad last frame with zeros", OFFSET(pad), AV_OPT_TYPE_INT, {.dbl=1}, 0, 1 },
{ "nb_out_samples", "set the number of per-frame output samples", OFFSET(nb_out_samples), AV_OPT_TYPE_INT, {.dbl=1024}, 1, INT_MAX },
@@ -50,20 +51,14 @@ static const AVOption asns_options[] = {
{ NULL }
};
-static const AVClass asns_class = {
- .class_name = "asetnsamples",
- .item_name = av_default_item_name,
- .option = asns_options,
- .version = LIBAVUTIL_VERSION_INT,
- .category = AV_CLASS_CATEGORY_FILTER,
-};
+AVFILTER_DEFINE_CLASS(asetnsamples);
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
{
ASNSContext *asns = ctx->priv;
int err;
- asns->class = &asns_class;
+ asns->class = &asetnsamples_class;
av_opt_set_defaults(asns);
if ((err = av_set_options_string(asns, args, "=", ":")) < 0) {