History

avfilter/vsrc_testsrc: Deduplicate options

Andreas Rheinhardt committed 5 years ago

Commit 482aeda1 parent 6fed8a61 file · +5 −10Browse files

Unified · Split

libavfilter/vsrc_testsrc.c+5−10
@@ -99,6 +99,9 @@ typedef struct TestSourceContext { · 98 unmodified lines
99 99
100#define COMMON_OPTIONS SIZE_OPTIONS COMMON_OPTIONS_NOSIZE100#define COMMON_OPTIONS SIZE_OPTIONS COMMON_OPTIONS_NOSIZE
101 101
102#define NOSIZE_OPTIONS_OFFSET 2
103/* Filters using COMMON_OPTIONS_NOSIZE also use the following options
104 * via &options[NOSIZE_OPTIONS_OFFSET]. So don't break it. */
102static const AVOption options[] = {105static const AVOption options[] = {
103 COMMON_OPTIONS106 COMMON_OPTIONS
104 { NULL }107 { NULL }
@@ -1653,11 +1656,7 @@ AVFilter ff_vsrc_smptehdbars = { · 1548 unmodified lines
1653 1656
1654#if CONFIG_ALLYUV_FILTER1657#if CONFIG_ALLYUV_FILTER
1655 1658
1656static const AVOption allyuv_options[] = {1659#define allyuv_options &options[NOSIZE_OPTIONS_OFFSET]
1657 COMMON_OPTIONS_NOSIZE
1658 { NULL }
1659};
1660
1661AVFILTER_DEFINE_CLASS(allyuv);1660AVFILTER_DEFINE_CLASS(allyuv);
1662 1661
1663static void allyuv_fill_picture(AVFilterContext *ctx, AVFrame *frame)1662static void allyuv_fill_picture(AVFilterContext *ctx, AVFrame *frame)
@@ -1734,11 +1733,7 @@ AVFilter ff_vsrc_allyuv = { · 70 unmodified lines
1734 1733
1735#if CONFIG_ALLRGB_FILTER1734#if CONFIG_ALLRGB_FILTER
1736 1735
1737static const AVOption allrgb_options[] = {1736#define allrgb_options &options[NOSIZE_OPTIONS_OFFSET]
1738 COMMON_OPTIONS_NOSIZE
1739 { NULL }
1740};
1741
1742AVFILTER_DEFINE_CLASS(allrgb);1737AVFILTER_DEFINE_CLASS(allrgb);
1743 1738
1744static void allrgb_fill_picture(AVFilterContext *ctx, AVFrame *frame)1739static void allrgb_fill_picture(AVFilterContext *ctx, AVFrame *frame)

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