@@ -97,8 +97,13 @@ static int request_frame(AVFilterLink *outlink)
|
|||||||
|
|
||||||
ret = ff_request_frame(ctx->inputs[0]);
|
ret = ff_request_frame(ctx->inputs[0]);
|
||||||
|
|
||||||
|
next:
|
||||||
if (ret == AVERROR_EOF && !ctx->is_disabled && s->nb_frames > 0) {
|
if (ret == AVERROR_EOF && !ctx->is_disabled && s->nb_frames > 0) {
|
||||||
AVFrame *out = s->frames[s->nb_frames - 1];
|
AVFrame *out = s->frames[s->nb_frames - 1];
|
||||||
|
if (!out) {
|
||||||
|
s->nb_frames--;
|
||||||
|
goto next;
|
||||||
|
}
|
||||||
out->pts = s->pts[s->flush_idx++];
|
out->pts = s->pts[s->flush_idx++];
|
||||||
ret = ff_filter_frame(outlink, out);
|
ret = ff_filter_frame(outlink, out);
|
||||||
s->frames[s->nb_frames - 1] = NULL;
|
s->frames[s->nb_frames - 1] = NULL;
|
||||||
|
Reference in New Issue
Block a user