diff options
Diffstat (limited to 'libavfilter/af_astreamsync.c')
-rw-r--r-- | libavfilter/af_astreamsync.c | 55 |
1 files changed, 32 insertions, 23 deletions
diff --git a/libavfilter/af_astreamsync.c b/libavfilter/af_astreamsync.c index 44f6aababf..269ffc10e1 100644 --- a/libavfilter/af_astreamsync.c +++ b/libavfilter/af_astreamsync.c @@ -180,6 +180,36 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *insamples) return 0; } +static const AVFilterPad astreamsync_inputs[] = { + { + .name = "in1", + .type = AVMEDIA_TYPE_AUDIO, + .filter_frame = filter_frame, + .min_perms = AV_PERM_READ | AV_PERM_PRESERVE, + },{ + .name = "in2", + .type = AVMEDIA_TYPE_AUDIO, + .filter_frame = filter_frame, + .min_perms = AV_PERM_READ | AV_PERM_PRESERVE, + }, + { NULL } +}; + +static const AVFilterPad astreamsync_outputs[] = { + { + .name = "out1", + .type = AVMEDIA_TYPE_AUDIO, + .config_props = config_output, + .request_frame = request_frame, + },{ + .name = "out2", + .type = AVMEDIA_TYPE_AUDIO, + .config_props = config_output, + .request_frame = request_frame, + }, + { NULL } +}; + AVFilter avfilter_af_astreamsync = { .name = "astreamsync", .description = NULL_IF_CONFIG_SMALL("Copy two streams of audio data " @@ -187,27 +217,6 @@ AVFilter avfilter_af_astreamsync = { .priv_size = sizeof(AStreamSyncContext), .init = init, .query_formats = query_formats, - - .inputs = (const AVFilterPad[]) { - { .name = "in1", - .type = AVMEDIA_TYPE_AUDIO, - .filter_frame = filter_frame, - .min_perms = AV_PERM_READ | AV_PERM_PRESERVE, }, - { .name = "in2", - .type = AVMEDIA_TYPE_AUDIO, - .filter_frame = filter_frame, - .min_perms = AV_PERM_READ | AV_PERM_PRESERVE, }, - { .name = NULL } - }, - .outputs = (const AVFilterPad[]) { - { .name = "out1", - .type = AVMEDIA_TYPE_AUDIO, - .config_props = config_output, - .request_frame = request_frame, }, - { .name = "out2", - .type = AVMEDIA_TYPE_AUDIO, - .config_props = config_output, - .request_frame = request_frame, }, - { .name = NULL } - }, + .inputs = astreamsync_inputs, + .outputs = astreamsync_outputs, }; |