changeset 34825:5ed9693f8071

Remove pointless global variables.
author reimar
date Thu, 17 May 2012 22:10:19 +0000
parents 59bac49bba26
children 26d77af0f13a
files libvo/vo_corevideo.m
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_corevideo.m	Thu May 17 21:45:24 2012 +0000
+++ b/libvo/vo_corevideo.m	Thu May 17 22:10:19 2012 +0000
@@ -75,7 +75,6 @@
 
 static uint32_t image_width;
 static uint32_t image_height;
-static uint32_t image_depth;
 static uint32_t image_bytes;
 static uint32_t image_format;
 
@@ -85,7 +84,6 @@
 static int isRootwin;
 
 static float winAlpha = 1;
-static int int_pause = 0;
 
 static BOOL isLeopardOrLater;
 
@@ -173,17 +171,16 @@
 	switch (image_format)
 	{
 		case IMGFMT_RGB24:
-			image_depth = 24;
+			image_bytes = 3;
 			break;
 		case IMGFMT_ARGB:
 		case IMGFMT_BGRA:
-			image_depth = 32;
+			image_bytes = 4;
 			break;
 		case IMGFMT_YUY2:
-			image_depth = 16;
+			image_bytes = 2;
 			break;
 	}
-	image_bytes = (image_depth + 7) / 8;
 
 	if(!shared_buffer)
 	{
@@ -424,8 +421,9 @@
 	switch (request)
 	{
 		case VOCTRL_DRAW_IMAGE: return draw_image(data);
-		case VOCTRL_PAUSE: return int_pause = 1;
-		case VOCTRL_RESUME: return int_pause = 0;
+		case VOCTRL_PAUSE:
+		case VOCTRL_RESUME:
+			return VO_TRUE;
 		case VOCTRL_QUERY_FORMAT: return query_format(*(uint32_t*)data);
 		case VOCTRL_ONTOP: vo_ontop = !vo_ontop; if(!shared_buffer){ [mpGLView ontop]; } else { [mplayerosxProto ontop]; } return VO_TRUE;
 		case VOCTRL_ROOTWIN: vo_rootwin = !vo_rootwin; [mpGLView rootwin]; return VO_TRUE;