]> git.sesse.net Git - vlc/commitdiff
. Fixed the sdl plugins to match the changes in the version 1.1.5
authorStéphane Borel <stef@videolan.org>
Wed, 25 Oct 2000 20:54:05 +0000 (20:54 +0000)
committerStéphane Borel <stef@videolan.org>
Wed, 25 Oct 2000 20:54:05 +0000 (20:54 +0000)
The vlc gives a segfault when exiting if you use sdl. I still don't know why

plugins/sdl/intf_sdl.c
plugins/sdl/vout_sdl.c

index fde64b8e137da2821f5afb118d9a7c19230352dc..8d2612362041b000bd6d662be7c829a0b2c04fb0 100644 (file)
@@ -179,6 +179,8 @@ void intf_SDLManage( intf_thread_t *p_intf )
 
 void intf_SDL_Fullscreen(intf_thread_t * p_intf)
 {
+    SDL_Rect    clipping_rect;
+    
     SDL_FreeSurface( p_intf->p_vout->p_sys->p_display );
     
     if(p_intf->p_sys->b_Fullscreen == 0)
@@ -213,9 +215,13 @@ void intf_SDL_Fullscreen(intf_thread_t * p_intf)
     p_intf->p_vout->p_sys->p_buffer[ 1 ] = p_intf->p_vout->p_sys->p_display->pixels;
     
     SDL_Flip(p_intf->p_vout->p_sys->p_display);
-    SDL_SetClipping(p_intf->p_vout->p_sys->p_display, 0, 0,
-            p_intf->p_vout->p_sys->p_display->w,
-            p_intf->p_vout->p_sys->p_display->h );
+
+    /* Clipping zone for the text */
+    clipping_rect.x = 0;
+    clipping_rect.y = 0;
+    clipping_rect.w = p_intf->p_vout->p_sys->p_display->w;
+    clipping_rect.h = p_intf->p_vout->p_sys->p_display->h;
+    SDL_SetClipRect(p_intf->p_vout->p_sys->p_display, &clipping_rect);
     
     p_intf->p_vout->i_width =           p_intf->p_vout->p_sys->p_display->w;
     p_intf->p_vout->i_height =          p_intf->p_vout->p_sys->p_display->h;
index d688b20f616a6fff56172f4f7ad9541b9a837442..95b364478c56f723815668e3fb956d01d9806b33 100644 (file)
@@ -196,6 +196,8 @@ void vout_SDLDisplay( vout_thread_t *p_vout )
  *****************************************************************************/
 static int SDLOpenDisplay( vout_thread_t *p_vout, char *psz_display, void *p_data )
 {
+    SDL_Rect    clipping_rect;
+    
     /* Initialize library */
     if( SDL_Init(SDL_INIT_VIDEO) < 0 )
     {
@@ -256,9 +258,11 @@ static int SDLOpenDisplay( vout_thread_t *p_vout, char *psz_display, void *p_dat
 */
                
     /* Set clipping for text */
-    SDL_SetClipping(p_vout->p_sys->p_display, 0, 0,
-                         p_vout->p_sys->p_display->w, 
-                        p_vout->p_sys->p_display->h );
+    clipping_rect.x = 0;
+    clipping_rect.y = 0;
+    clipping_rect.w = p_vout->p_sys->p_display->w;
+    clipping_rect.h = p_vout->p_sys->p_display->h;
+    SDL_SetClipRect(p_vout->p_sys->p_display, &clipping_rect);