X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_idet.c;h=e4fe6cbe7f4b262bf737a0045aec3856168448ab;hb=ca540fbdb448950b2cc2be82bd1b75cee1bc94f3;hp=711ba6e2185416bf7b37b63c07b266d92b2e8c3c;hpb=7b865c222e43e315ef78859f5f87fb225fe09fb1;p=ffmpeg diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index 711ba6e2185..e4fe6cbe7f4 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -313,29 +313,24 @@ static int request_frame(AVFilterLink *link) { AVFilterContext *ctx = link->src; IDETContext *idet = ctx->priv; + int ret; - do { - int ret; + if (idet->eof) + return AVERROR_EOF; - if (idet->eof) - return AVERROR_EOF; + ret = ff_request_frame(link->src->inputs[0]); - ret = ff_request_frame(link->src->inputs[0]); + if (ret == AVERROR_EOF && idet->cur && !idet->analyze_interlaced_flag_done) { + AVFrame *next = av_frame_clone(idet->next); - if (ret == AVERROR_EOF && idet->cur && !idet->analyze_interlaced_flag_done) { - AVFrame *next = av_frame_clone(idet->next); + if (!next) + return AVERROR(ENOMEM); - if (!next) - return AVERROR(ENOMEM); - - filter_frame(link->src->inputs[0], next); - idet->eof = 1; - } else if (ret < 0) { - return ret; - } - } while (link->frame_requested); + ret = filter_frame(link->src->inputs[0], next); + idet->eof = 1; + } - return 0; + return ret; } static av_cold void uninit(AVFilterContext *ctx) @@ -405,12 +400,6 @@ static int query_formats(AVFilterContext *ctx) 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) { IDETContext *idet = ctx->priv; @@ -445,7 +434,6 @@ static const AVFilterPad idet_outputs[] = { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_output, .request_frame = request_frame }, { NULL }