mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avfilter/vf_decimate: always properly handle EOF
This commit is contained in:
parent
4b4282bc57
commit
f1357274e9
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user