]> git.sesse.net Git - mlt/commitdiff
Fix SDL resize regression in last commit. (SF-186)
authorDan Dennedy <dan@dennedy.org>
Sun, 10 Feb 2013 19:44:29 +0000 (11:44 -0800)
committerDan Dennedy <dan@dennedy.org>
Sun, 10 Feb 2013 19:44:29 +0000 (11:44 -0800)
src/modules/sdl/consumer_sdl.c
src/modules/sdl/consumer_sdl_still.c

index 0a9926e625a3a875f872f6e4a49d121a3c5ea5cf..4d8ab8fc8b043b7baa2e9c69f508d30fe79bd347 100644 (file)
@@ -563,8 +563,9 @@ static int consumer_play_video( consumer_sdl this, mlt_frame frame )
 
                        // open SDL window with video overlay, if possible
                        pthread_mutex_lock( &mlt_sdl_mutex );
-                       consumer_get_dimensions( &this->window_width, &this->window_height );
                        SDL_Surface *screen = SDL_SetVideoMode( this->window_width, this->window_height, this->bpp, this->sdl_flags );
+                       if ( consumer_get_dimensions( &this->window_width, &this->window_height ) )
+                               screen = SDL_SetVideoMode( this->window_width, this->window_height, this->bpp, this->sdl_flags );
                        pthread_mutex_unlock( &mlt_sdl_mutex );
 
                        if ( screen )
index efddb29273921246c3307c30bdaea8acbaef30b8..725165b70a5bee8a629a65d1aedeb388c1e1a10c 100644 (file)
@@ -428,8 +428,9 @@ static int consumer_play_video( consumer_sdl this, mlt_frame frame )
        {
                // open SDL window
                pthread_mutex_lock( &mlt_sdl_mutex );
-               consumer_get_dimensions( &this->window_width, &this->window_height );
                SDL_Surface *screen = SDL_SetVideoMode( this->window_width, this->window_height, 0, this->sdl_flags );
+               if ( consumer_get_dimensions( &this->window_width, &this->window_height ) )
+                       screen = SDL_SetVideoMode( this->window_width, this->window_height, 0, this->sdl_flags );
 
                if ( screen )
                {