pthread_cond_init( &this->audio_cond, NULL);
pthread_mutex_init( &this->video_mutex, NULL );
pthread_cond_init( &this->video_cond, NULL);
-
+
// Default scaler (for now we'll use nearest)
mlt_properties_set( this->properties, "rescale", "nearest" );
+ mlt_properties_set( this->properties, "deinterlace_method", "onefield" );
// Default buffer for low latency
mlt_properties_set_int( this->properties, "buffer", 1 );
consumer_play_video( this, frame );
pthread_cond_wait( &this->refresh_cond, &this->refresh_mutex );
}
+ mlt_frame_close( frame );
this->refresh_count --;
pthread_mutex_unlock( &this->refresh_mutex );
}
+ else
+ mlt_frame_close( frame );
// Optimisation to reduce latency
if ( speed == 1.0 )
// Destroy mutexes
pthread_mutex_destroy( &this->audio_mutex );
pthread_cond_destroy( &this->audio_cond );
+ pthread_mutex_destroy( &this->video_mutex );
+ pthread_cond_destroy( &this->video_cond );
+ pthread_mutex_destroy( &this->refresh_mutex );
+ pthread_cond_destroy( &this->refresh_cond );
// Finally clean up this
free( this );