consumer_sdl.c
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Thu, 1 Sep 2005 10:32:35 +0000 (10:32 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Thu, 1 Sep 2005 10:32:35 +0000 (10:32 +0000)
consumer_sdl_still.c
+ Corrections to silly mistake regarding initialisation from previous checkin

git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@822 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/sdl/consumer_sdl.c
src/modules/sdl/consumer_sdl_still.c

index 3810069..b652b9e 100644 (file)
@@ -194,14 +194,14 @@ int consumer_start( mlt_consumer parent )
                }
                else
                {
-                       if ( SDL_GetVideoSurface( ) != NULL )
-                               this->sdl_screen = SDL_GetVideoSurface( );
+                       this->sdl_screen = SDL_GetVideoSurface( );
                }
 
                if ( !mlt_properties_get_int( MLT_CONSUMER_PROPERTIES( parent ), "audio_off" ) )
                        SDL_InitSubSystem( SDL_INIT_AUDIO );
 
-               this->sdl_screen = SDL_SetVideoMode( this->window_width, this->window_height, 0, this->sdl_flags );
+               if ( this->sdl_screen == NULL )
+                       this->sdl_screen = SDL_SetVideoMode( this->window_width, this->window_height, 0, this->sdl_flags );
 
                pthread_create( &this->thread, NULL, consumer_thread, this );
        }
index c55d0e2..9957dd1 100644 (file)
@@ -193,7 +193,7 @@ static int consumer_start( mlt_consumer parent )
                        }
                }
 
-               if ( this->sdl_screen != NULL )
+               if ( this->sdl_screen == NULL )
                        this->sdl_screen = SDL_SetVideoMode( this->window_width, this->window_height, 0, this->sdl_flags );
 
                pthread_create( &this->thread, NULL, consumer_thread, this );