Fix FPE.
(cherry picked from commit 84da9339c21f679836a024ce86a69c6ea4a6fd11)
... | ... |
@@ -504,7 +504,7 @@ static int request_frame(AVFilterLink *outlink) |
504 | 504 |
int r; |
505 | 505 |
|
506 | 506 |
r = ff_request_frame(inlink); |
507 |
- if (r == AVERROR_EOF && !s->palette_pushed) { |
|
507 |
+ if (r == AVERROR_EOF && !s->palette_pushed && s->nb_refs) { |
|
508 | 508 |
r = ff_filter_frame(outlink, get_palette_frame(ctx)); |
509 | 509 |
s->palette_pushed = 1; |
510 | 510 |
return r; |