[FFmpeg-devel] [PATCH 2/5] lavfi/vf_idet: remove the loop in request_frame().
Nicolas George
george at nsup.org
Wed Aug 26 13:19:34 CEST 2015
It is not necessary due to the use of FF_LINK_FLAG_REQUEST_LOOP.
Signed-off-by: Nicolas George <george at nsup.org>
---
libavfilter/vf_idet.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
index eb1303a..113e8ec 100644
--- a/libavfilter/vf_idet.c
+++ b/libavfilter/vf_idet.c
@@ -314,7 +314,7 @@ static int request_frame(AVFilterLink *link)
AVFilterContext *ctx = link->src;
IDETContext *idet = ctx->priv;
- do {
+ // TODO reindent
int ret;
if (idet->eof)
@@ -328,14 +328,11 @@ static int request_frame(AVFilterLink *link)
if (!next)
return AVERROR(ENOMEM);
- filter_frame(link->src->inputs[0], next);
+ ret = filter_frame(link->src->inputs[0], next);
idet->eof = 1;
- } else if (ret < 0) {
- return ret;
}
- } while (link->frame_requested);
- return 0;
+ return ret;
}
static av_cold void uninit(AVFilterContext *ctx)
--
2.5.0
More information about the ffmpeg-devel
mailing list