avfilter/vf_pullup: fix gray8
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 31 Mar 2014 01:22:20 +0000 (03:22 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 23 Jun 2014 13:10:07 +0000 (15:10 +0200)
Fixes segfault
Fixes Ticket3469

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e818ee090ac53d1b333a7d6a45274f75cf1a71a1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/vf_pullup.c

index 4ad441f..80f448b 100644 (file)
@@ -235,6 +235,8 @@ static int alloc_buffer(PullupContext *s, PullupBuffer *b)
     for (i = 0; i < s->nb_planes; i++) {
         b->planes[i] = av_malloc(s->planeheight[i] * s->planewidth[i]);
     }
+    if (s->nb_planes == 1)
+        b->planes[1] = av_malloc(4*256);
 
     return 0;
 }