summaryrefslogtreecommitdiff
path: root/libavfilter/vf_blend.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-03-22 09:54:06 +0100
committerClément Bœsch <ubitux@gmail.com>2013-03-22 23:09:08 +0100
commit89b4e758d3d0b1170297281e567cb12cc718e234 (patch)
treebd1e0837073c3d7bd192d7b8c17480687003774f /libavfilter/vf_blend.c
parent859f7da543bfade2dd00307c2bb361e0213899f5 (diff)
lavfi/blend: always peek the first frame of each queue.
Before the change, filter_frame() always waited for 2 samples in the bottom frames queue. This notably fixes commands such as ./ffplay tests/lena.pnm -vf split,blend=c0_mode=addition
Diffstat (limited to 'libavfilter/vf_blend.c')
-rw-r--r--libavfilter/vf_blend.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c
index bc276d4a8f..c9e7e7d856 100644
--- a/libavfilter/vf_blend.c
+++ b/libavfilter/vf_blend.c
@@ -359,7 +359,7 @@ static int request_frame(AVFilterLink *outlink)
b->frame_requested = 1;
while (b->frame_requested) {
- in = ff_bufqueue_peek(&b->queue_top, TOP) ? BOTTOM : TOP;
+ in = ff_bufqueue_peek(&b->queue_top, 0) ? BOTTOM : TOP;
ret = ff_request_frame(ctx->inputs[in]);
if (ret < 0)
return ret;
@@ -413,8 +413,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
while (1) {
AVFrame *top_buf, *bottom_buf, *out_buf;
- if (!ff_bufqueue_peek(&b->queue_top, TOP) ||
- !ff_bufqueue_peek(&b->queue_bottom, BOTTOM)) break;
+ if (!ff_bufqueue_peek(&b->queue_top, 0) ||
+ !ff_bufqueue_peek(&b->queue_bottom, 0)) break;
top_buf = ff_bufqueue_get(&b->queue_top);
bottom_buf = ff_bufqueue_get(&b->queue_bottom);