summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-12-31 11:07:29 +0100
committerClément Bœsch <ubitux@gmail.com>2013-02-17 12:58:20 +0100
commit3a0a959dcbf80f46241ff4997e5b095e6695b84d (patch)
tree5b10cca477e807f8ef3a758b229eb3b46bed0021 /libavfilter
parentf796399344a1bb2ecdf9e273ea62dfa53e33908a (diff)
lavfi/subtitles: split options between ass and subtitles.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_ass.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/libavfilter/vf_ass.c b/libavfilter/vf_ass.c
index c64d940c3d..84ce55d8ce 100644
--- a/libavfilter/vf_ass.c
+++ b/libavfilter/vf_ass.c
@@ -59,12 +59,10 @@ typedef struct {
#define OFFSET(x) offsetof(AssContext, x)
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
-static const AVOption options[] = {
- {"filename", "set the filename of file to read", OFFSET(filename), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
- {"f", "set the filename of file to read", OFFSET(filename), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
- {"original_size", "set the size of the original video (used to scale fonts)", OFFSET(original_w), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
- {NULL},
-};
+#define COMMON_OPTIONS \
+ {"filename", "set the filename of file to read", OFFSET(filename), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS }, \
+ {"f", "set the filename of file to read", OFFSET(filename), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS }, \
+ {"original_size", "set the size of the original video (used to scale fonts)", OFFSET(original_w), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS }, \
/* libass supports a log level ranging from 0 to 7 */
static const int ass_libavfilter_log_level_map[] = {
@@ -213,7 +211,11 @@ static const AVFilterPad ass_outputs[] = {
#if CONFIG_ASS_FILTER
-#define ass_options options
+static const AVOption ass_options[] = {
+ COMMON_OPTIONS
+ {NULL},
+};
+
AVFILTER_DEFINE_CLASS(ass);
static av_cold int init_ass(AVFilterContext *ctx, const char *args)
@@ -249,7 +251,11 @@ AVFilter avfilter_vf_ass = {
#if CONFIG_SUBTITLES_FILTER
-#define subtitles_options options
+static const AVOption subtitles_options[] = {
+ COMMON_OPTIONS
+ {NULL},
+};
+
AVFILTER_DEFINE_CLASS(subtitles);
static av_cold int init_subtitles(AVFilterContext *ctx, const char *args)