diff options
author | Nicolas George <george@nsup.org> | 2015-08-25 20:33:48 +0200 |
---|---|---|
committer | Nicolas George <george@nsup.org> | 2015-09-20 19:02:33 +0200 |
commit | 2a351f6c5521c199b4285e4e42f2321e312170bd (patch) | |
tree | 12eb1841bec672aab701b908d37416b28826bc9e /libavfilter/avfilter.c | |
parent | 598f8a7afae6d0b8a49f85ec2de69acdc5e7ac6a (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.c | 10 |
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; |