History

avfilter/vf_random: fix crash

Fixes #8235.

Paul B Mahol committed 7 years ago

Commit b67af531 parent f6df99d1 file · +5 −0Browse files

Unified · Split

libavfilter/vf_random.c+5−0
@@ -97,8 +97,13 @@ static int request_frame(AVFilterLink *outlink) · 96 unmodified lines
97 97
98 ret = ff_request_frame(ctx->inputs[0]);98 ret = ff_request_frame(ctx->inputs[0]);
99 99
100next:
100 if (ret == AVERROR_EOF && !ctx->is_disabled && s->nb_frames > 0) {101 if (ret == AVERROR_EOF && !ctx->is_disabled && s->nb_frames > 0) {
101 AVFrame *out = s->frames[s->nb_frames - 1];102 AVFrame *out = s->frames[s->nb_frames - 1];
103 if (!out) {
104 s->nb_frames--;
105 goto next;
106 }
102 out->pts = s->pts[s->flush_idx++];107 out->pts = s->pts[s->flush_idx++];
103 ret = ff_filter_frame(outlink, out);108 ret = ff_filter_frame(outlink, out);
104 s->frames[s->nb_frames - 1] = NULL;109 s->frames[s->nb_frames - 1] = NULL;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t