lavu/frame: use AVPALETTE_SIZE instead of 1024
authorClément Bœsch <clement@stupeflix.com>
Tue, 8 Dec 2015 16:50:40 +0000 (17:50 +0100)
committerClément Bœsch <clement@stupeflix.com>
Tue, 8 Dec 2015 16:50:40 +0000 (17:50 +0100)
libavutil/frame.c

index 4297e07..f2097e9 100644 (file)
@@ -198,7 +198,7 @@ static int get_video_buffer(AVFrame *frame, int align)
     }
     if (desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) {
         av_buffer_unref(&frame->buf[1]);
-        frame->buf[1] = av_buffer_alloc(1024);
+        frame->buf[1] = av_buffer_alloc(AVPALETTE_SIZE);
         if (!frame->buf[1])
             goto fail;
         frame->data[1] = frame->buf[1]->data;