lavfi: replace link.closed by link.status.

The status field can carry any error code instead of just EOF.
Also only update it through a wrapper function and provide a timestamp.
Update the few filters that used it directly.
This commit is contained in:
Nicolas George
2015-09-24 10:07:42 +02:00
parent 39a09e995d
commit 108b4de552
8 changed files with 49 additions and 21 deletions

View File

@@ -174,7 +174,8 @@ static int trim_filter_frame(AVFilterLink *inlink, AVFrame *frame)
drop = 0;
if (drop) {
s->eof = inlink->closed = 1;
s->eof = 1;
ff_avfilter_link_set_out_status(inlink, AVERROR_EOF, AV_NOPTS_VALUE);
goto drop;
}
}
@@ -305,7 +306,8 @@ static int atrim_filter_frame(AVFilterLink *inlink, AVFrame *frame)
}
if (drop) {
s->eof = inlink->closed = 1;
s->eof = 1;
ff_avfilter_link_set_out_status(inlink, AVERROR_EOF, AV_NOPTS_VALUE);
goto drop;
}
}