|
|
|
@ -267,20 +267,25 @@ static int activate(AVFilterContext *ctx) |
|
|
|
|
} |
|
|
|
|
if (ret < 0) { |
|
|
|
|
return ret; |
|
|
|
|
} else if (dm->eof == ((1 << INPUT_MAIN) | ((dm->ppsrc << INPUT_CLEANSRC) * dm->ppsrc))) { |
|
|
|
|
} else if (dm->eof == ((1 << INPUT_MAIN) | (dm->ppsrc << INPUT_CLEANSRC))) { |
|
|
|
|
ff_outlink_set_status(ctx->outputs[0], AVERROR_EOF, dm->last_pts); |
|
|
|
|
return 0; |
|
|
|
|
} else if (!(dm->eof & (1 << INPUT_MAIN)) && ff_inlink_acknowledge_status(ctx->inputs[INPUT_MAIN], &status, &pts)) { |
|
|
|
|
if (status == AVERROR_EOF) { // flushing
|
|
|
|
|
dm->eof |= 1 << INPUT_MAIN; |
|
|
|
|
if (!dm->ppsrc) |
|
|
|
|
return filter_frame(ctx->inputs[INPUT_MAIN], NULL); |
|
|
|
|
if (dm->ppsrc) |
|
|
|
|
filter_frame(ctx->inputs[INPUT_CLEANSRC], NULL); |
|
|
|
|
filter_frame(ctx->inputs[INPUT_MAIN], NULL); |
|
|
|
|
ff_outlink_set_status(ctx->outputs[0], AVERROR_EOF, dm->last_pts); |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
} else if (dm->ppsrc && !(dm->eof & (1 << INPUT_CLEANSRC)) && ff_inlink_acknowledge_status(ctx->inputs[INPUT_CLEANSRC], &status, &pts)) { |
|
|
|
|
if (status == AVERROR_EOF) { // flushing
|
|
|
|
|
dm->eof |= 1 << INPUT_CLEANSRC; |
|
|
|
|
filter_frame(ctx->inputs[INPUT_MAIN], NULL); |
|
|
|
|
return filter_frame(ctx->inputs[INPUT_CLEANSRC], NULL); |
|
|
|
|
filter_frame(ctx->inputs[INPUT_CLEANSRC], NULL); |
|
|
|
|
ff_outlink_set_status(ctx->outputs[0], AVERROR_EOF, dm->last_pts); |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|