History

avfilter/vf_dedot: fix crash

Fixes #8299

Paul B Mahol committed 7 years ago

Commit 8f63c4e1 parent ce401881 file · +6 −2Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_dedot.c+6−2
@@ -283,7 +283,7 @@ static int activate(AVFilterContext *ctx) · 282 unmodified lines
283 s->frames[i] = av_frame_clone(frame);283 s->frames[i] = av_frame_clone(frame);
284 }284 }
285 av_frame_free(&frame);285 av_frame_free(&frame);
286 } else {286 } else if (s->frames[3]) {
287 s->eof_frames--;287 s->eof_frames--;
288 s->frames[4] = av_frame_clone(s->frames[3]);288 s->frames[4] = av_frame_clone(s->frames[3]);
289 }289 }
@@ -343,7 +343,11 @@ static int activate(AVFilterContext *ctx) · 53 unmodified lines
343 if (!s->eof && ff_inlink_acknowledge_status(inlink, &status, &pts)) {343 if (!s->eof && ff_inlink_acknowledge_status(inlink, &status, &pts)) {
344 if (status == AVERROR_EOF) {344 if (status == AVERROR_EOF) {
345 s->eof = 1;345 s->eof = 1;
346 s->eof_frames = 2;346 s->eof_frames = !!s->frames[0] + !!s->frames[1];
347 if (s->eof_frames <= 0) {
348 ff_outlink_set_status(outlink, AVERROR_EOF, pts);
349 return 0;
350 }
347 ff_filter_set_ready(ctx, 10);351 ff_filter_set_ready(ctx, 10);
348 return 0;352 return 0;
349 }353 }

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