diff options
author | Paul B Mahol <onemda@gmail.com> | 2020-02-03 09:40:46 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2020-02-03 09:40:46 +0100 |
commit | c4e29d0ba316f5bc0a9f73331ee2eb082c25532b (patch) | |
tree | 53b8a752283d22edb238aa7f110f91b296982024 | |
parent | 6d5e9ed67cf0b720d66df2214f2e8e195830472d (diff) | |
download | ffmpeg-c4e29d0ba316f5bc0a9f73331ee2eb082c25532b.tar.gz |
avfilter/vf_xfade_opencl: move passthrough code before eof check
-rw-r--r-- | libavfilter/vf_xfade_opencl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_xfade_opencl.c b/libavfilter/vf_xfade_opencl.c index b858ea5a03..4736043147 100644 --- a/libavfilter/vf_xfade_opencl.c +++ b/libavfilter/vf_xfade_opencl.c @@ -270,6 +270,9 @@ static int xfade_opencl_activate(AVFilterContext *avctx) ret = ff_inlink_consume_frame(avctx->inputs[1], &in); if (ret < 0) { return ret; + } else if (ret > 0) { + in->pts = (in->pts - ctx->last_pts) + ctx->pts; + return ff_filter_frame(outlink, in); } else if (ff_inlink_acknowledge_status(avctx->inputs[1], &status, &pts)) { ff_outlink_set_status(outlink, status, ctx->pts); return 0; @@ -278,9 +281,6 @@ static int xfade_opencl_activate(AVFilterContext *avctx) ff_inlink_request_frame(avctx->inputs[1]); return 0; } - } else { - in->pts = (in->pts - ctx->last_pts) + ctx->pts; - return ff_filter_frame(outlink, in); } } |