pthread_attr_t thread_attributes;
this->running = 1;
-
+
+ // Allow the user to force resizing to window size
+ if ( mlt_properties_get_int( this->properties, "resize" ) )
+ {
+ mlt_properties_set_int( this->properties, "width", this->width );
+ mlt_properties_set_int( this->properties, "height", this->height );
+ }
+
// Inherit the scheduling priority
pthread_attr_init( &thread_attributes );
pthread_attr_setinheritsched( &thread_attributes, PTHREAD_INHERIT_SCHED );
changed = 1;
}
+ if ( this->sdl_screen == NULL || changed )
+ {
SDL_Rect rect;
// Determine frame's display aspect ratio
rect.x = ( this->window_width - rect.w ) / 2;
rect.y = ( this->window_height - rect.h ) / 2;
- if ( this->sdl_screen == NULL || changed )
- {
// Force an overlay recreation
if ( this->sdl_overlay != NULL )
SDL_FreeYUVOverlay( this->sdl_overlay );
sdl_unlock_display();
}
}
- else
- {
- SDL_SetClipRect( this->sdl_screen, &rect );
- }
-
+
if ( this->sdl_screen != NULL && this->sdl_overlay != NULL )
{
this->buffer = this->sdl_overlay->pixels[ 0 ];