this->window_height = this->height;
// Set the sdl flags
- this->sdl_flags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL | SDL_RESIZABLE | SDL_DOUBLEBUF;
+ //this->sdl_flags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL | SDL_RESIZABLE | SDL_DOUBLEBUF;
+ // Experimental settings
+ this->sdl_flags = SDL_RESIZABLE | SDL_DOUBLEBUF;
// Allow thread to be started/stopped
parent->start = consumer_start;
mlt_properties_set_int( properties, "changed", 0 );
}
-
if ( changed == 0 &&
this->last_position == mlt_frame_get_position( frame ) &&
this->last_producer == mlt_properties_get_data( MLT_FRAME_PROPERTIES( frame ), "_producer", NULL ) )
mlt_properties_set_int( this->properties, "rect_h", this->rect.h );
}
- if ( !mlt_consumer_is_stopped( &this->parent ) && this->sdl_screen != NULL && this->sdl_screen->pixels != NULL )
+ if ( !mlt_consumer_is_stopped( &this->parent ) && SDL_GetVideoSurface( ) != NULL && this->sdl_screen != NULL && this->sdl_screen->pixels != NULL )
{
memset( this->sdl_screen->pixels, 0, this->window_width * this->window_height * this->sdl_screen->format->BytesPerPixel );
// internal intialization
mlt_frame frame = NULL;
- struct timespec tm = { 0, 99999999 };
if ( mlt_properties_get_int( MLT_CONSUMER_PROPERTIES( consumer ), "sdl_started" ) == 0 )
{
// Ensure that we have a frame
if ( frame != NULL )
{
- if ( consumer_play_video( this, frame ) == 0 )
- nanosleep( &tm, NULL );
+ consumer_play_video( this, frame );
mlt_frame_close( frame );
}
+ else
+ {
+ this->running = 0;
+ }
}
if ( mlt_properties_get_int( MLT_CONSUMER_PROPERTIES( consumer ), "sdl_started" ) == 0 )