diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c
index 20ad8628e6..4eff8fc9b5 100644
--- a/libvo/vo_vesa.c
+++ b/libvo/vo_vesa.c
@@ -450,17 +450,16 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3
 	num_modes = 0;
 	mode_ptr = vib.VideoModePtr;
 	while(*mode_ptr++ != 0xffff) num_modes++;
-	yuv_fmt = format == IMGFMT_YV12 || format == IMGFMT_I420 || format == IMGFMT_IYUV;
 	switch(format)
 	{
 		case IMGFMT_BGR8:
 		case IMGFMT_RGB8:  bpp = 8; break;
 		case IMGFMT_BGR15:
                 case IMGFMT_RGB15: bpp = 15; break;
-		default:
 		case IMGFMT_YV12:
 		case IMGFMT_I420:
-		case IMGFMT_IYUV:
+		case IMGFMT_IYUV: yuv_fmt = 1;
+		default:
 		case IMGFMT_BGR16:
 		case IMGFMT_RGB16: bpp = 16; break;
 		case IMGFMT_BGR24: