1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/vf_random: fix crash

Fixes #8235.
This commit is contained in:
Paul B Mahol 2019-10-10 21:04:56 +02:00
parent f6df99dba1
commit b67af536be

View File

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