X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fsdl%2Fconsumer_sdl_still.c;h=f2146f5eaa82083ad635291dbaf5ddf54f61c955;hb=01d0f9853dd68fc14493db560e4930b2e0e3e0e2;hp=f9e3aa750d2e5d0b99a3c7abe2e0f0574330fc60;hpb=34302be17d7f9797adf2a3bff34c11a3d9fcdc7d;p=melted diff --git a/src/modules/sdl/consumer_sdl_still.c b/src/modules/sdl/consumer_sdl_still.c index f9e3aa7..f2146f5 100644 --- a/src/modules/sdl/consumer_sdl_still.c +++ b/src/modules/sdl/consumer_sdl_still.c @@ -158,8 +158,6 @@ static int consumer_start( mlt_consumer parent ) if ( !this->running ) { - pthread_attr_t thread_attributes; - // Attach a colour space converter if ( !this->filtered ) { @@ -185,11 +183,7 @@ static int consumer_start( mlt_consumer parent ) //this->width = this->height * this->display_aspect; - // Inherit the scheduling priority - pthread_attr_init( &thread_attributes ); - pthread_attr_setinheritsched( &thread_attributes, PTHREAD_INHERIT_SCHED ); - - pthread_create( &this->thread, &thread_attributes, consumer_thread, this ); + pthread_create( &this->thread, NULL, consumer_thread, this ); } return 0; @@ -418,7 +412,7 @@ static int consumer_play_video( consumer_sdl this, mlt_frame frame ) } else { - changed = mlt_properties_get_int( properties, "changed" ) | mlt_properties_get_int( MLT_FRAME_PROPERTIES( frame ), "refresh" ); + changed = 1; mlt_properties_set_int( properties, "changed", 0 ); } @@ -569,6 +563,10 @@ static void *consumer_thread( void *arg ) 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 )