if ( rect.w == 0 || rect.h == 0 ) return;
int scale_width = ( width << 16 ) / rect.w;
int scale_height = ( height << 16 ) / rect.h;
- int stride = width * 3;
+ int stride = width * 4;
int x, y, row_index;
uint8_t *q, *row;
row = image + stride * row_index;
for ( x = 0; x < rect.w; x ++ )
{
- q = row + ( ( ( 32768 + scale_width * x ) >> 16 ) * 3 );
+ q = row + ( ( ( 32768 + scale_width * x ) >> 16 ) * 4 );
*p ++ = SDL_MapRGB( screen->format, *q, *( q + 1 ), *( q + 2 ) );
}
start += scanlength;
if ( rect.w == 0 || rect.h == 0 ) return;
int scale_width = ( width << 16 ) / rect.w;
int scale_height = ( height << 16 ) / rect.h;
- int stride = width * 3;
+ int stride = width * 4;
int x, y, row_index;
uint8_t *q, *row;
row = image + stride * row_index;
for ( x = 0; x < rect.w; x ++ )
{
- q = row + ( ( ( 32768 + scale_width * x ) >> 16 ) * 3 );
+ q = row + ( ( ( 32768 + scale_width * x ) >> 16 ) * 4 );
*p ++ = SDL_MapRGB( screen->format, *q, *( q + 1 ), *( q + 2 ) );
}
start += scanlength;
if ( rect.w == 0 || rect.h == 0 ) return;
int scale_width = ( width << 16 ) / rect.w;
int scale_height = ( height << 16 ) / rect.h;
- int stride = width * 3;
+ int stride = width * 4;
int x, y, row_index;
uint8_t *q, *row;
row = image + stride * row_index;
for ( x = 0; x < rect.w; x ++ )
{
- q = row + ( ( ( 32768 + scale_width * x ) >> 16 ) * 3 );
+ q = row + ( ( ( 32768 + scale_width * x ) >> 16 ) * 4 );
pixel = SDL_MapRGB( screen->format, *q, *( q + 1 ), *( q + 2 ) );
*p ++ = (pixel & 0xFF0000) >> 16;
*p ++ = (pixel & 0x00FF00) >> 8;
if ( rect.w == 0 || rect.h == 0 ) return;
int scale_width = ( width << 16 ) / rect.w;
int scale_height = ( height << 16 ) / rect.h;
- int stride = width * 3;
+ int stride = width * 4;
int x, y, row_index;
uint8_t *q, *row;
row = image + stride * row_index;
for ( x = 0; x < rect.w; x ++ )
{
- q = row + ( ( ( 32768 + scale_width * x ) >> 16 ) * 3 );
+ q = row + ( ( ( 32768 + scale_width * x ) >> 16 ) * 4 );
*p ++ = SDL_MapRGB( screen->format, *q, *( q + 1 ), *( q + 2 ) );
}
start += scanlength;
// Get the properties of this consumer
mlt_properties properties = this->properties;
- mlt_image_format vfmt = mlt_image_rgb24;
+ mlt_image_format vfmt = mlt_image_rgb24a;
int height = this->height;
int width = this->width;
uint8_t *image = NULL;
this->sdl_screen = SDL_SetVideoMode( this->window_width, this->window_height, 0, this->sdl_flags );
if ( consumer_get_dimensions( &this->window_width, &this->window_height ) )
this->sdl_screen = SDL_SetVideoMode( this->window_width, this->window_height, 0, this->sdl_flags );
- pthread_mutex_unlock( &mlt_sdl_mutex );
uint32_t color = mlt_properties_get_int( this->properties, "window_background" );
- SDL_FillRect( this->sdl_screen, NULL, color >> 8 );
- changed = 1;
+ if ( this->sdl_screen )
+ {
+ SDL_FillRect( this->sdl_screen, NULL, color >> 8 );
+ changed = 1;
+ }
+ pthread_mutex_unlock( &mlt_sdl_mutex );
}
if ( changed == 0 &&