]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_xfade_opencl: move passthrough code before eof check
authorPaul B Mahol <onemda@gmail.com>
Mon, 3 Feb 2020 08:40:46 +0000 (09:40 +0100)
committerPaul B Mahol <onemda@gmail.com>
Mon, 3 Feb 2020 08:40:46 +0000 (09:40 +0100)
libavfilter/vf_xfade_opencl.c

index b858ea5a0332fa52324a70e05960cf0d98e36db5..47360431474c052354ace9a9e5bb1419521719c1 100644 (file)
@@ -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);
         }
     }