Fixes #8299
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -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 | } |