]> git.sesse.net Git - vlc/blobdiff - modules/video_output/fb.c
fb: fix palette size (4 channels and not 8)
[vlc] / modules / video_output / fb.c
index 8b900253af18f7456ea98c492320bc3c0b4e7ebd..06555f4bc68b3e54c906a635ef8ecf7f944711af 100644 (file)
@@ -591,7 +591,7 @@ static int OpenDisplay(vout_display_t *vd, bool force_resolution)
 
     switch (sys->var_info.bits_per_pixel) {
     case 8:
-        sys->palette = malloc(8 * 256 * sizeof(uint16_t));
+        sys->palette = malloc(4 * 256 * sizeof(uint16_t));
         if (!sys->palette) {
             /* Restore fb config */
             ioctl(sys->fd, FBIOPUT_VSCREENINFO, &sys->old_info);