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
9797
9898 ret = ff_request_frame(ctx->inputs[0]);
9999
100+next:
100101 if (ret == AVERROR_EOF && !ctx->is_disabled && s->nb_frames > 0) {
101102 AVFrame *out = s->frames[s->nb_frames - 1];
103+ if (!out) {
104+ s->nb_frames--;
105+ goto next;
106+ }
102107 out->pts = s->pts[s->flush_idx++];
103108 ret = ff_filter_frame(outlink, out);
104109 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