mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
lavfi/alphamerge: raise filter_frame() error.
This commit is contained in:
parent
05854f5505
commit
f32fee570a
1 changed files with 5 additions and 4 deletions
|
|
@ -131,12 +131,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
|
|||
AVFilterContext *ctx = inlink->dst;
|
||||
AlphaMergeContext *merge = ctx->priv;
|
||||
|
||||
int ret = 0;
|
||||
int is_alpha = (inlink == ctx->inputs[1]);
|
||||
struct FFBufQueue *queue =
|
||||
(is_alpha ? &merge->queue_alpha : &merge->queue_main);
|
||||
ff_bufqueue_add(ctx, queue, buf);
|
||||
|
||||
while (1) {
|
||||
do {
|
||||
AVFrame *main_buf, *alpha_buf;
|
||||
|
||||
if (!ff_bufqueue_peek(&merge->queue_main, 0) ||
|
||||
|
|
@ -147,10 +148,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
|
|||
|
||||
merge->frame_requested = 0;
|
||||
draw_frame(ctx, main_buf, alpha_buf);
|
||||
ff_filter_frame(ctx->outputs[0], main_buf);
|
||||
ret = ff_filter_frame(ctx->outputs[0], main_buf);
|
||||
av_frame_free(&alpha_buf);
|
||||
}
|
||||
return 0;
|
||||
} while (ret >= 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int request_frame(AVFilterLink *outlink)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue