Browse code

avfilter/vf_pullup: fix gray8

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>

Michael Niedermayer authored on 2014/03/31 10:22:20
Showing 1 changed files
... ...
@@ -256,6 +256,8 @@ static int alloc_buffer(PullupContext *s, PullupBuffer *b)
256 256
     for (i = 0; i < s->nb_planes; i++) {
257 257
         b->planes[i] = av_malloc(s->planeheight[i] * s->planewidth[i]);
258 258
     }
259
+    if (s->nb_planes == 1)
260
+        b->planes[1] = av_malloc(4*256);
259 261
 
260 262
     return 0;
261 263
 }