Unified · Split
| @@ -398,6 +398,8 @@ static int config_output(AVFilterLink *outlink) · 397 unmodified lines | ||
| 398 | 398 | static int activate(AVFilterContext *ctx) |
| 399 | 399 | { |
| 400 | 400 | GuidedContext *s = ctx->priv; |
| 401 | + AVFilterLink *outlink = ctx->outputs[0]; | |
| 402 | + AVFilterLink *inlink = ctx->inputs[0]; | |
| 401 | 403 | AVFrame *frame = NULL; |
| 402 | 404 | AVFrame *out = NULL; |
| 403 | 405 | int ret, status; |
| @@ -405,26 +407,26 @@ static int activate(AVFilterContext *ctx) · 1 unmodified line | ||
| 405 | 407 | if (s->guidance) |
| 406 | 408 | return ff_framesync_activate(&s->fs); |
| 407 | 409 | |
| 408 | − FF_FILTER_FORWARD_STATUS_BACK(ctx->outputs[0], ctx->inputs[0]); | |
| 410 | + FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink); | |
| 409 | 411 | |
| 410 | − if ((ret = ff_inlink_consume_frame(ctx->inputs[0], &frame)) > 0) { | |
| 412 | + if ((ret = ff_inlink_consume_frame(inlink, &frame)) > 0) { | |
| 411 | 413 | if (ctx->is_disabled) |
| 412 | − return ff_filter_frame(ctx->outputs[0], frame); | |
| 414 | + return ff_filter_frame(outlink, frame); | |
| 413 | 415 | |
| 414 | 416 | ret = filter_frame(ctx, &out, frame, frame); |
| 415 | 417 | av_frame_free(&frame); |
| 416 | 418 | if (ret < 0) |
| 417 | 419 | return ret; |
| 418 | − ret = ff_filter_frame(ctx->outputs[0], out); | |
| 420 | + ret = ff_filter_frame(outlink, out); | |
| 419 | 421 | } |
| 420 | 422 | if (ret < 0) |
| 421 | 423 | return ret; |
| 422 | − if (ff_inlink_acknowledge_status(ctx->inputs[0], &status, &pts)) { | |
| 423 | − ff_outlink_set_status(ctx->outputs[0], status, pts); | |
| 424 | + if (ff_inlink_acknowledge_status(inlink, &status, &pts)) { | |
| 425 | + ff_outlink_set_status(outlink, status, pts); | |
| 424 | 426 | return 0; |
| 425 | 427 | } |
| 426 | − if (ff_outlink_frame_wanted(ctx->outputs[0])) | |
| 427 | − ff_inlink_request_frame(ctx->inputs[0]); | |
| 428 | + if (ff_outlink_frame_wanted(outlink)) | |
| 429 | + ff_inlink_request_frame(inlink); | |
| 428 | 430 | return 0; |
| 429 | 431 | } |
| 430 | 432 | |