[Mplayer-cvslog] CVS: main/libvo vo_sdl.c,1.95,1.96

Jindrich Makovicka CVS henry at mplayerhq.hu
Mon Nov 11 17:14:50 CET 2002


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv546

Modified Files:
	vo_sdl.c 
Log Message:
fixed mode switching on Mac

Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- vo_sdl.c	11 Nov 2002 15:20:26 -0000	1.95
+++ vo_sdl.c	11 Nov 2002 16:14:28 -0000	1.96
@@ -670,6 +670,14 @@
 	struct sdl_priv_s *priv = &sdl_priv;
     SDL_Surface* newsurface;    
 
+    if(priv->rgbsurface)
+	SDL_FreeSurface(priv->rgbsurface);
+    else if(priv->overlay)
+	SDL_FreeYUVOverlay(priv->overlay);
+ 
+    priv->rgbsurface = NULL;
+    priv->overlay = NULL;
+ 
     newsurface = SDL_SetVideoMode(width, height, bpp, sdlflags);
 
     if(newsurface) {
@@ -693,6 +701,14 @@
 	SDL_Surface *newsurface = NULL;
  	int screen_surface_w, screen_surface_h;
 	
+ 	if(priv->rgbsurface)
+	        SDL_FreeSurface(priv->rgbsurface);
+ 	else if(priv->overlay)
+	        SDL_FreeYUVOverlay(priv->overlay);
+ 
+ 	priv->rgbsurface = NULL;
+ 	priv->overlay = NULL;
+ 
 	/* if we haven't set a fullmode yet, default to the lowest res fullmode first */
 	/* But select a mode where the full video enter */
 	if(priv->X && priv->fulltype & FS) {




More information about the MPlayer-cvslog mailing list