lavfi: remove FF_LINK_FLAG_REQUEST_LOOP.

It has no longer any effect.
pull/151/head
Nicolas George 9 years ago
parent 2a351f6c55
commit 44f660e7e7
  1. 1
      libavfilter/af_afade.c
  2. 1
      libavfilter/af_asetnsamples.c
  3. 2
      libavfilter/af_atempo.c
  4. 1
      libavfilter/af_compand.c
  5. 7
      libavfilter/af_dynaudnorm.c
  6. 8
      libavfilter/af_silenceremove.c
  7. 1
      libavfilter/avf_showfreqs.c
  8. 1
      libavfilter/avfilter.c
  9. 4
      libavfilter/f_ebur128.c
  10. 2
      libavfilter/f_interleave.c
  11. 8
      libavfilter/f_reverse.c
  12. 1
      libavfilter/framesync.c
  13. 14
      libavfilter/internal.h
  14. 8
      libavfilter/trim.c
  15. 7
      libavfilter/vf_atadenoise.c
  16. 5
      libavfilter/vf_blend.c
  17. 1
      libavfilter/vf_decimate.c
  18. 1
      libavfilter/vf_detelecine.c
  19. 1
      libavfilter/vf_fieldmatch.c
  20. 1
      libavfilter/vf_framerate.c
  21. 1
      libavfilter/vf_framestep.c
  22. 7
      libavfilter/vf_idet.c
  23. 1
      libavfilter/vf_interlace.c
  24. 1
      libavfilter/vf_palettegen.c
  25. 7
      libavfilter/vf_pullup.c
  26. 7
      libavfilter/vf_random.c
  27. 1
      libavfilter/vf_stereo3d.c
  28. 1
      libavfilter/vf_telecine.c
  29. 2
      libavfilter/vf_tile.c
  30. 1
      libavfilter/vf_tinterlace.c
  31. 1
      libavfilter/vf_w3fdif.c

@ -611,7 +611,6 @@ static int acrossfade_config_output(AVFilterLink *outlink)
outlink->time_base = ctx->inputs[0]->time_base; outlink->time_base = ctx->inputs[0]->time_base;
outlink->channel_layout = ctx->inputs[0]->channel_layout; outlink->channel_layout = ctx->inputs[0]->channel_layout;
outlink->channels = ctx->inputs[0]->channels; outlink->channels = ctx->inputs[0]->channels;
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
switch (outlink->format) { switch (outlink->format) {
case AV_SAMPLE_FMT_DBL: s->crossfade_samples = crossfade_samples_dbl; break; case AV_SAMPLE_FMT_DBL: s->crossfade_samples = crossfade_samples_dbl; break;

@ -77,7 +77,6 @@ static int config_props_output(AVFilterLink *outlink)
asns->fifo = av_audio_fifo_alloc(outlink->format, outlink->channels, asns->nb_out_samples); asns->fifo = av_audio_fifo_alloc(outlink->format, outlink->channels, asns->nb_out_samples);
if (!asns->fifo) if (!asns->fifo)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return 0; return 0;
} }

@ -1046,8 +1046,6 @@ static int config_props(AVFilterLink *inlink)
int sample_rate = (int)inlink->sample_rate; int sample_rate = (int)inlink->sample_rate;
int channels = av_get_channel_layout_nb_channels(inlink->channel_layout); int channels = av_get_channel_layout_nb_channels(inlink->channel_layout);
ctx->outputs[0]->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return yae_reset(atempo, format, sample_rate, channels); return yae_reset(atempo, format, sample_rate, channels);
} }

@ -531,7 +531,6 @@ static int config_output(AVFilterLink *outlink)
if (err) if (err)
return err; return err;
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
s->compand = compand_delay; s->compand = compand_delay;
return 0; return 0;
} }

@ -305,12 +305,6 @@ static int config_input(AVFilterLink *inlink)
return 0; return 0;
} }
static int config_output(AVFilterLink *outlink)
{
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return 0;
}
static inline double fade(double prev, double next, int pos, static inline double fade(double prev, double next, int pos,
double *fade_factors[2]) double *fade_factors[2])
{ {
@ -721,7 +715,6 @@ static const AVFilterPad avfilter_af_dynaudnorm_outputs[] = {
{ {
.name = "default", .name = "default",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.config_props = config_output,
.request_frame = request_frame, .request_frame = request_frame,
}, },
{ NULL } { NULL }

@ -153,13 +153,6 @@ static int config_input(AVFilterLink *inlink)
return 0; return 0;
} }
static int config_output(AVFilterLink *outlink)
{
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return 0;
}
static double compute_rms(SilenceRemoveContext *s, double sample) static double compute_rms(SilenceRemoveContext *s, double sample)
{ {
double new_sum; double new_sum;
@ -463,7 +456,6 @@ static const AVFilterPad silenceremove_outputs[] = {
{ {
.name = "default", .name = "default",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.config_props = config_output,
.request_frame = request_frame, .request_frame = request_frame,
}, },
{ NULL } { NULL }

@ -300,7 +300,6 @@ static int config_output(AVFilterLink *outlink)
s->scale += s->window_func_lut[i] * s->window_func_lut[i]; s->scale += s->window_func_lut[i] * s->window_func_lut[i];
} }
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
outlink->frame_rate = av_make_q(inlink->sample_rate, s->win_size * (1.-s->overlap)); outlink->frame_rate = av_make_q(inlink->sample_rate, s->win_size * (1.-s->overlap));
outlink->sample_aspect_ratio = (AVRational){1,1}; outlink->sample_aspect_ratio = (AVRational){1,1};
outlink->w = s->w; outlink->w = s->w;

@ -1097,7 +1097,6 @@ static int ff_filter_frame_needs_framing(AVFilterLink *link, AVFrame *frame)
int nb_channels = av_frame_get_channels(frame); int nb_channels = av_frame_get_channels(frame);
int ret = 0; int ret = 0;
link->flags |= FF_LINK_FLAG_REQUEST_LOOP;
/* Handle framing (min_samples, max_samples) */ /* Handle framing (min_samples, max_samples) */
while (insamples) { while (insamples) {
if (!pbuf) { if (!pbuf) {

@ -337,8 +337,6 @@ static int config_video_output(AVFilterLink *outlink)
DRAW_RECT(ebur128->graph); DRAW_RECT(ebur128->graph);
DRAW_RECT(ebur128->gauge); DRAW_RECT(ebur128->gauge);
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return 0; return 0;
} }
@ -398,8 +396,6 @@ static int config_audio_output(AVFilterLink *outlink)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
#if CONFIG_SWRESAMPLE #if CONFIG_SWRESAMPLE
if (ebur128->peak_mode & PEAK_MODE_TRUE_PEAKS) { if (ebur128->peak_mode & PEAK_MODE_TRUE_PEAKS) {
int ret; int ret;

@ -180,8 +180,6 @@ static int config_output(AVFilterLink *outlink)
} }
} }
} }
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return 0; return 0;
} }

@ -62,12 +62,6 @@ static av_cold void uninit(AVFilterContext *ctx)
av_freep(&s->frames); av_freep(&s->frames);
} }
static int config_output(AVFilterLink *outlink)
{
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return 0;
}
static int filter_frame(AVFilterLink *inlink, AVFrame *in) static int filter_frame(AVFilterLink *inlink, AVFrame *in)
{ {
AVFilterContext *ctx = inlink->dst; AVFilterContext *ctx = inlink->dst;
@ -129,7 +123,6 @@ static const AVFilterPad reverse_outputs[] = {
.name = "default", .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame, .request_frame = request_frame,
.config_props = config_output,
}, },
{ NULL } { NULL }
}; };
@ -240,7 +233,6 @@ static const AVFilterPad areverse_outputs[] = {
.name = "default", .name = "default",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.request_frame = areverse_request_frame, .request_frame = areverse_request_frame,
.config_props = config_output,
}, },
{ NULL } { NULL }
}; };

@ -322,7 +322,6 @@ int ff_framesync_request_frame(FFFrameSync *fs, AVFilterLink *outlink)
return 0; return 0;
if (fs->eof) if (fs->eof)
return AVERROR_EOF; return AVERROR_EOF;
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
input = fs->in_request; input = fs->in_request;
ret = ff_request_frame(ctx->inputs[input]); ret = ff_request_frame(ctx->inputs[input]);
if (ret == AVERROR_EOF) { if (ret == AVERROR_EOF) {

@ -335,20 +335,6 @@ int ff_request_frame(AVFilterLink *link);
*/ */
int ff_filter_frame(AVFilterLink *link, AVFrame *frame); int ff_filter_frame(AVFilterLink *link, AVFrame *frame);
/**
* Flags for AVFilterLink.flags.
*/
enum {
/**
* Frame requests may need to loop in order to be fulfilled.
* A filter must set this flags on an output link if it may return 0 in
* request_frame() without filtering a frame.
*/
FF_LINK_FLAG_REQUEST_LOOP = 1,
};
/** /**
* Allocate a new filter context and return it. * Allocate a new filter context and return it.
* *

@ -114,12 +114,6 @@ static int config_input(AVFilterLink *inlink)
return 0; return 0;
} }
static int config_output(AVFilterLink *outlink)
{
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return 0;
}
#define OFFSET(x) offsetof(TrimContext, x) #define OFFSET(x) offsetof(TrimContext, x)
#define COMMON_OPTS \ #define COMMON_OPTS \
{ "starti", "Timestamp of the first frame that " \ { "starti", "Timestamp of the first frame that " \
@ -223,7 +217,6 @@ static const AVFilterPad trim_outputs[] = {
{ {
.name = "default", .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output,
}, },
{ NULL } { NULL }
}; };
@ -378,7 +371,6 @@ static const AVFilterPad atrim_outputs[] = {
{ {
.name = "default", .name = "default",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.config_props = config_output,
}, },
{ NULL } { NULL }
}; };

@ -285,12 +285,6 @@ static int config_input(AVFilterLink *inlink)
return 0; return 0;
} }
static int config_output(AVFilterLink *outlink)
{
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return 0;
}
static int filter_frame(AVFilterLink *inlink, AVFrame *buf) static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
{ {
AVFilterContext *ctx = inlink->dst; AVFilterContext *ctx = inlink->dst;
@ -401,7 +395,6 @@ static const AVFilterPad outputs[] = {
.name = "default", .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame, .request_frame = request_frame,
.config_props = config_output,
}, },
{ NULL } { NULL }
}; };

@ -467,9 +467,8 @@ static int config_output(AVFilterLink *outlink)
is_16bit = pix_desc->comp[0].depth == 16; is_16bit = pix_desc->comp[0].depth == 16;
s->nb_planes = av_pix_fmt_count_planes(toplink->format); s->nb_planes = av_pix_fmt_count_planes(toplink->format);
if (s->tblend) if (!s->tblend)
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP; if ((ret = ff_dualinput_init(ctx, &s->dinput)) < 0)
else if ((ret = ff_dualinput_init(ctx, &s->dinput)) < 0)
return ret; return ret;
for (plane = 0; plane < FF_ARRAY_ELEMS(s->params); plane++) { for (plane = 0; plane < FF_ARRAY_ELEMS(s->params); plane++) {

@ -372,7 +372,6 @@ static int config_output(AVFilterLink *outlink)
fps = av_mul_q(fps, (AVRational){dm->cycle - 1, dm->cycle}); fps = av_mul_q(fps, (AVRational){dm->cycle - 1, dm->cycle});
av_log(ctx, AV_LOG_VERBOSE, "FPS: %d/%d -> %d/%d\n", av_log(ctx, AV_LOG_VERBOSE, "FPS: %d/%d -> %d/%d\n",
inlink->frame_rate.num, inlink->frame_rate.den, fps.num, fps.den); inlink->frame_rate.num, inlink->frame_rate.den, fps.num, fps.den);
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
outlink->time_base = inlink->time_base; outlink->time_base = inlink->time_base;
outlink->frame_rate = fps; outlink->frame_rate = fps;
outlink->sample_aspect_ratio = inlink->sample_aspect_ratio; outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;

@ -170,7 +170,6 @@ static int config_output(AVFilterLink *outlink)
av_log(ctx, AV_LOG_VERBOSE, "FPS: %d/%d -> %d/%d\n", av_log(ctx, AV_LOG_VERBOSE, "FPS: %d/%d -> %d/%d\n",
inlink->frame_rate.num, inlink->frame_rate.den, fps.num, fps.den); inlink->frame_rate.num, inlink->frame_rate.den, fps.num, fps.den);
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
outlink->frame_rate = fps; outlink->frame_rate = fps;
outlink->time_base = av_mul_q(inlink->time_base, s->pts); outlink->time_base = av_mul_q(inlink->time_base, s->pts);
av_log(ctx, AV_LOG_VERBOSE, "TB: %d/%d -> %d/%d\n", av_log(ctx, AV_LOG_VERBOSE, "TB: %d/%d -> %d/%d\n",

@ -953,7 +953,6 @@ static int config_output(AVFilterLink *outlink)
const AVFilterLink *inlink = const AVFilterLink *inlink =
ctx->inputs[fm->ppsrc ? INPUT_CLEANSRC : INPUT_MAIN]; ctx->inputs[fm->ppsrc ? INPUT_CLEANSRC : INPUT_MAIN];
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
outlink->time_base = inlink->time_base; outlink->time_base = inlink->time_base;
outlink->sample_aspect_ratio = inlink->sample_aspect_ratio; outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
outlink->frame_rate = inlink->frame_rate; outlink->frame_rate = inlink->frame_rate;

@ -639,7 +639,6 @@ static int config_output(AVFilterLink *outlink)
outlink->frame_rate = s->dest_frame_rate; outlink->frame_rate = s->dest_frame_rate;
outlink->time_base = s->dest_time_base; outlink->time_base = s->dest_time_base;
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
ff_dlog(ctx, ff_dlog(ctx,
"config_output() output time base:%u/%u (%f) w:%d h:%d\n", "config_output() output time base:%u/%u (%f) w:%d h:%d\n",

@ -49,7 +49,6 @@ static int config_output_props(AVFilterLink *outlink)
FrameStepContext *framestep = ctx->priv; FrameStepContext *framestep = ctx->priv;
AVFilterLink *inlink = ctx->inputs[0]; AVFilterLink *inlink = ctx->inputs[0];
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
outlink->frame_rate = outlink->frame_rate =
av_div_q(inlink->frame_rate, (AVRational){framestep->frame_step, 1}); av_div_q(inlink->frame_rate, (AVRational){framestep->frame_step, 1});

@ -400,12 +400,6 @@ static int query_formats(AVFilterContext *ctx)
return ff_set_common_formats(ctx, fmts_list); return ff_set_common_formats(ctx, fmts_list);
} }
static int config_output(AVFilterLink *outlink)
{
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return 0;
}
static av_cold int init(AVFilterContext *ctx) static av_cold int init(AVFilterContext *ctx)
{ {
IDETContext *idet = ctx->priv; IDETContext *idet = ctx->priv;
@ -440,7 +434,6 @@ static const AVFilterPad idet_outputs[] = {
{ {
.name = "default", .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output,
.request_frame = request_frame .request_frame = request_frame
}, },
{ NULL } { NULL }

@ -113,7 +113,6 @@ static int config_out_props(AVFilterLink *outlink)
// half framerate // half framerate
outlink->time_base.num *= 2; outlink->time_base.num *= 2;
outlink->frame_rate.den *= 2; outlink->frame_rate.den *= 2;
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
if (s->lowpass) { if (s->lowpass) {

@ -520,7 +520,6 @@ static int config_output(AVFilterLink *outlink)
{ {
outlink->w = outlink->h = 16; outlink->w = outlink->h = 16;
outlink->sample_aspect_ratio = av_make_q(1, 1); outlink->sample_aspect_ratio = av_make_q(1, 1);
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return 0; return 0;
} }

@ -220,12 +220,6 @@ static int config_input(AVFilterLink *inlink)
return 0; return 0;
} }
static int config_output(AVFilterLink *outlink)
{
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return 0;
}
static PullupBuffer *pullup_lock_buffer(PullupBuffer *b, int parity) static PullupBuffer *pullup_lock_buffer(PullupBuffer *b, int parity)
{ {
if (!b) if (!b)
@ -766,7 +760,6 @@ static const AVFilterPad pullup_outputs[] = {
{ {
.name = "default", .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output,
}, },
{ NULL } { NULL }
}; };

@ -64,12 +64,6 @@ static av_cold int init(AVFilterContext *ctx)
return 0; return 0;
} }
static int config_output(AVFilterLink *outlink)
{
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return 0;
}
static int filter_frame(AVFilterLink *inlink, AVFrame *in) static int filter_frame(AVFilterLink *inlink, AVFrame *in)
{ {
AVFilterContext *ctx = inlink->dst; AVFilterContext *ctx = inlink->dst;
@ -128,7 +122,6 @@ static const AVFilterPad random_outputs[] = {
.name = "default", .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame, .request_frame = request_frame,
.config_props = config_output,
}, },
{ NULL } { NULL }
}; };

@ -373,7 +373,6 @@ static int config_output(AVFilterLink *outlink)
break; break;
case ALTERNATING_RL: case ALTERNATING_RL:
case ALTERNATING_LR: case ALTERNATING_LR:
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
fps.den *= 2; fps.den *= 2;
tb.num *= 2; tb.num *= 2;
break; break;

@ -157,7 +157,6 @@ static int config_output(AVFilterLink *outlink)
av_log(ctx, AV_LOG_VERBOSE, "FPS: %d/%d -> %d/%d\n", av_log(ctx, AV_LOG_VERBOSE, "FPS: %d/%d -> %d/%d\n",
inlink->frame_rate.num, inlink->frame_rate.den, fps.num, fps.den); inlink->frame_rate.num, inlink->frame_rate.den, fps.num, fps.den);
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
outlink->frame_rate = fps; outlink->frame_rate = fps;
outlink->time_base = av_mul_q(inlink->time_base, s->pts); outlink->time_base = av_mul_q(inlink->time_base, s->pts);
av_log(ctx, AV_LOG_VERBOSE, "TB: %d/%d -> %d/%d\n", av_log(ctx, AV_LOG_VERBOSE, "TB: %d/%d -> %d/%d\n",

@ -116,8 +116,6 @@ static int config_props(AVFilterLink *outlink)
ff_draw_init(&tile->draw, inlink->format, 0); ff_draw_init(&tile->draw, inlink->format, 0);
ff_draw_color(&tile->draw, &tile->blank, tile->rgba_color); ff_draw_color(&tile->draw, &tile->blank, tile->rgba_color);
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return 0; return 0;
} }

@ -117,7 +117,6 @@ static int config_out_props(AVFilterLink *outlink)
int i; int i;
tinterlace->vsub = desc->log2_chroma_h; tinterlace->vsub = desc->log2_chroma_h;
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
outlink->w = inlink->w; outlink->w = inlink->w;
outlink->h = tinterlace->mode == MODE_MERGE || tinterlace->mode == MODE_PAD ? outlink->h = tinterlace->mode == MODE_MERGE || tinterlace->mode == MODE_PAD ?
inlink->h*2 : inlink->h; inlink->h*2 : inlink->h;

@ -117,7 +117,6 @@ static int config_output(AVFilterLink *outlink)
outlink->time_base.den = inlink->time_base.den * 2; outlink->time_base.den = inlink->time_base.den * 2;
outlink->frame_rate.num = inlink->frame_rate.num * 2; outlink->frame_rate.num = inlink->frame_rate.num * 2;
outlink->frame_rate.den = inlink->frame_rate.den; outlink->frame_rate.den = inlink->frame_rate.den;
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
return 0; return 0;
} }

Loading…
Cancel
Save