History

avfilter/vf_xmedian: Define OFFSET, FLAGS macros unconditionally

They are currently defined inside the #if CONFIG_XMEDIAN_FILTER block. Fixes standalone compilation of the tmedian filter. Broken in f58939affe39f39038cbdfc6b731b1c9caed3caf.

Andreas Rheinhardt committed 2 years ago

Commit 2e1b9521 parent db53ee91 file · +4 −4Browse files

Unified · Split

libavfilter/vf_xmedian.c+4−4
@@ -60,6 +60,10 @@ typedef struct XMedianContext { · 59 unmodified lines
6060 int (*median_frames)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
6161 } XMedianContext;
6262
63+#define OFFSET(x) offsetof(XMedianContext, x)
64+#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
65+#define TFLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
66+
6367 static const enum AVPixelFormat pixel_fmts[] = {
6468 AV_PIX_FMT_GRAY8,
6569 AV_PIX_FMT_GRAY9,
@@ -361,10 +365,6 @@ static av_cold int xmedian_init(AVFilterContext *ctx) · 295 unmodified lines
361365 return init(ctx);
362366 }
363367
364−#define OFFSET(x) offsetof(XMedianContext, x)
365−#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
366−#define TFLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
367−
368368 static const AVOption xmedian_options[] = {
369369 { "inputs", "set number of inputs", OFFSET(nb_inputs), AV_OPT_TYPE_INT, {.i64=3}, 3, 255, .flags = FLAGS },
370370 { "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=15}, 0, 15, .flags =TFLAGS },

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t