summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2015-08-25 20:33:48 +0200
committerNicolas George <george@nsup.org>2015-09-20 19:02:33 +0200
commit2a351f6c5521c199b4285e4e42f2321e312170bd (patch)
tree12eb1841bec672aab701b908d37416b28826bc9e /libavfilter/avfilter.c
parent598f8a7afae6d0b8a49f85ec2de69acdc5e7ac6a (diff)
lavfi: drop the requirement that request_frame returns a frame.
It requires a loop in filters or the framework, that makes the scheduling less efficient and more complex. This is purely an internal change since the loop is now present in buffersink. Note that no filter except buffersink did rely on the requirement.
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 7da6cf2643..b9fadb3d59 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -347,9 +347,7 @@ int ff_request_frame(AVFilterLink *link)
if (link->closed)
return AVERROR_EOF;
- av_assert0(!link->frame_requested);
- link->frame_requested = 1;
- while (link->frame_requested) {
+ // TODO reindent
if (link->srcpad->request_frame)
ret = link->srcpad->request_frame(link);
else if (link->src->inputs[0])
@@ -360,14 +358,9 @@ int ff_request_frame(AVFilterLink *link)
ret = ff_filter_frame_framed(link, pbuf);
}
if (ret < 0) {
- link->frame_requested = 0;
if (ret == AVERROR_EOF)
link->closed = 1;
- } else {
- av_assert0(!link->frame_requested ||
- link->flags & FF_LINK_FLAG_REQUEST_LOOP);
}
- }
return ret;
}
@@ -1088,7 +1081,6 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
}
ret = filter_frame(link, out);
link->frame_count++;
- link->frame_requested = 0;
ff_update_link_current_pts(link, pts);
return ret;