59 #define CHECK_VIDEO_PARAM_CHANGE(s, c, width, height, format)\
60 if (c->w != width || c->h != height || c->pix_fmt != format) {\
61 av_log(s, AV_LOG_ERROR, "Changing frame properties on the fly is not supported.\n");\
62 return AVERROR(EINVAL);\
65 #define CHECK_AUDIO_PARAM_CHANGE(s, c, srate, ch_layout, format)\
66 if (c->sample_fmt != format || c->sample_rate != srate ||\
67 c->channel_layout != ch_layout) {\
68 av_log(s, AV_LOG_ERROR, "Changing frame properties on the fly is not supported.\n");\
69 return AVERROR(EINVAL);\
165 char pix_fmt_str[128];
169 (n = sscanf(args,
"%d:%d:%127[^:]:%d:%d:%d:%d", &c->
w, &c->
h, pix_fmt_str,
177 c->
pix_fmt = strtol(pix_fmt_str, &tail, 10);
191 #define OFFSET(x) offsetof(BufferSourceContext, x)
192 #define A AV_OPT_FLAG_AUDIO_PARAM
299 switch (link->
type) {
357 .description =
NULL_IF_CONFIG_SMALL(
"Buffer video frames, and make them accessible to the filterchain."),
365 .
outputs = avfilter_vsrc_buffer_outputs,
381 .description =
NULL_IF_CONFIG_SMALL(
"Buffer audio frames, and make them accessible to the filterchain."),
389 .
outputs = avfilter_asrc_abuffer_outputs,