[FFmpeg-cvslog] avfilter/palettegen: make sure at least one frame was sent to the filter

Clément Bœsch git at videolan.org
Sun Mar 15 19:10:26 CET 2015


ffmpeg | branch: release/2.6 | Clément Bœsch <u at pkh.me> | Sun Mar 15 19:09:16 2015 +0100| [b80c486fb3b5d324a03a2e9fb532d639b2258e1f] | committer: Clément Bœsch

avfilter/palettegen: make sure at least one frame was sent to the filter

Fix FPE.

(cherry picked from commit 84da9339c21f679836a024ce86a69c6ea4a6fd11)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b80c486fb3b5d324a03a2e9fb532d639b2258e1f
---

 libavfilter/vf_palettegen.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c
index 8b08140..4b49058 100644
--- a/libavfilter/vf_palettegen.c
+++ b/libavfilter/vf_palettegen.c
@@ -504,7 +504,7 @@ static int request_frame(AVFilterLink *outlink)
     int r;
 
     r = ff_request_frame(inlink);
-    if (r == AVERROR_EOF && !s->palette_pushed) {
+    if (r == AVERROR_EOF && !s->palette_pushed && s->nb_refs) {
         r = ff_filter_frame(outlink, get_palette_frame(ctx));
         s->palette_pushed = 1;
         return r;



More information about the ffmpeg-cvslog mailing list