Hello community,

here is the log from the commit of package gsequencer for openSUSE:Factory 
checked in at 2018-08-12 20:52:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gsequencer (Old)
 and      /work/SRC/openSUSE:Factory/.gsequencer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gsequencer"

Sun Aug 12 20:52:24 2018 rev:16 rq:628551 version:1.4.35

Changes:
--------
--- /work/SRC/openSUSE:Factory/gsequencer/gsequencer.changes    2018-07-09 
13:31:09.178513317 +0200
+++ /work/SRC/openSUSE:Factory/.gsequencer.new/gsequencer.changes       
2018-08-12 20:52:28.685114827 +0200
@@ -1,0 +2,6 @@
+Fri Aug 10 07:32:32 UTC 2018 - [email protected]
+
+- new upstream v1.4.35 fixes to automation editor's copy and paste
+  and minor fixes.
+
+-------------------------------------------------------------------

Old:
----
  gsequencer-1.4.34.tar.gz

New:
----
  gsequencer-1.4.35.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gsequencer.spec ++++++
--- /var/tmp/diff_new_pack.hywACB/_old  2018-08-12 20:52:29.177115824 +0200
+++ /var/tmp/diff_new_pack.hywACB/_new  2018-08-12 20:52:29.181115832 +0200
@@ -18,7 +18,7 @@
 %define libagssonumber 1
 %define libgsequencersonumber 0
 Name:           gsequencer
-Version:        1.4.34
+Version:        1.4.35
 Release:        0
 Summary:        Audio processing engine
 License:        GPL-3.0+ AND AGPL-3.0+ AND GFDL-1.3

++++++ gsequencer-1.4.34.tar.gz -> gsequencer-1.4.35.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gsequencer-1.4.34/ChangeLog 
new/gsequencer-1.4.35/ChangeLog
--- old/gsequencer-1.4.34/ChangeLog     2018-07-06 17:22:32.000000000 +0200
+++ new/gsequencer-1.4.35/ChangeLog     2018-08-09 23:09:30.000000000 +0200
@@ -1,3 +1,14 @@
+ags (1.4.35)
+
+       [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ]
+       * fixed potential data-race in ags_thread_pool.c
+       * fixed missing ref count of parent with AgsThreadPool
+       * fixed wrong argument to pthread_create() in ags_thread_pool.c
+       * fixed potential infinite loop in ags_simple_file.c
+       * fixed missing segmented notation in MIDI import
+       * fixed AgsAutomationEditor paste missing port automation
+       * fixed AgsNotationEditor paste wrong ref count
+
 ags (1.4.34)
 
        [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gsequencer-1.4.34/ags/X/ags_automation_editor.c 
new/gsequencer-1.4.35/ags/X/ags_automation_editor.c
--- old/gsequencer-1.4.34/ags/X/ags_automation_editor.c 2018-07-06 
16:59:47.000000000 +0200
+++ new/gsequencer-1.4.35/ags/X/ags_automation_editor.c 2018-08-09 
23:09:09.000000000 +0200
@@ -1728,19 +1728,44 @@
                                                  AgsTimestamp *timestamp,
                                                  gboolean match_line, gboolean 
no_duplicates)
   {    
+    AgsChannel *output, *input;
     AgsAutomation *automation;
                
+    AgsMutexManager *mutex_manager;
+
     GList *list_automation;
     
     guint first_x;
     guint current_x;
     gint i;
 
-    first_x = -1;
+    pthread_mutex_t *application_mutex;
+    pthread_mutex_t *audio_mutex;
+
+    mutex_manager = ags_mutex_manager_get_instance();
+    application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager);
+    
+    /* get audio mutex */
+    pthread_mutex_lock(application_mutex);
+
+    audio_mutex = ags_mutex_manager_lookup(mutex_manager,
+                                          (GObject *) machine->audio);
+  
+    pthread_mutex_unlock(application_mutex);
+
+    /* get some fields */
+    pthread_mutex_lock(audio_mutex);
+
+    output = machine->audio->output;
+    input = machine->audio->input;
+
+    pthread_mutex_unlock(audio_mutex);
 
     /*  */
     i = 0;
                
+    first_x = -1;
+
     while(notebook == NULL ||
          (i = ags_notebook_next_active_tab(notebook,
                                            i)) != -1){           
@@ -1749,6 +1774,9 @@
                                                                    timestamp);
 
       if(list_automation == NULL){
+       AgsChannel *channel;
+       AgsPort *play_port, *recall_port;
+       
        automation = ags_automation_new(machine->audio,
                                        i,
                                        
automation_editor->focused_automation_edit->channel_type,
@@ -1756,6 +1784,52 @@
        automation->timestamp->timer.ags_offset.offset = 
timestamp->timer.ags_offset.offset;
        machine->audio->automation = 
ags_automation_add(machine->audio->automation,
                                                        automation);
+       g_object_ref(automation);
+
+       /* port */
+       if(automation_editor->focused_automation_edit->channel_type == 
AGS_TYPE_OUTPUT){
+         channel = ags_channel_nth(output,
+                                   i);
+
+         play_port = ags_channel_find_port_by_specifier_and_scope(channel,
+                                                                  
automation_editor->focused_automation_edit->control_name,
+                                                                  TRUE);
+
+         recall_port = ags_channel_find_port_by_specifier_and_scope(channel,
+                                                                    
automation_editor->focused_automation_edit->control_name,
+                                                                    FALSE);
+       }else if(automation_editor->focused_automation_edit->channel_type == 
AGS_TYPE_INPUT){
+         channel = ags_channel_nth(input,
+                                   i);
+
+         play_port = ags_channel_find_port_by_specifier_and_scope(channel,
+                                                                  
automation_editor->focused_automation_edit->control_name,
+                                                                  TRUE);
+
+         recall_port = ags_channel_find_port_by_specifier_and_scope(channel,
+                                                                    
automation_editor->focused_automation_edit->control_name,
+                                                                    FALSE);
+       }else{
+         play_port = ags_audio_find_port_by_specifier_and_scope(machine->audio,
+                                                                
automation_editor->focused_automation_edit->control_name,
+                                                                TRUE);
+
+         recall_port = 
ags_audio_find_port_by_specifier_and_scope(machine->audio,
+                                                                  
automation_editor->focused_automation_edit->control_name,
+                                                                  FALSE);
+       }
+
+       if(play_port != NULL){
+         play_port->automation = ags_automation_add(play_port->automation,
+                                                    automation);
+         g_object_ref(automation); 
+       }
+
+       if(recall_port != NULL){
+         recall_port->automation = ags_automation_add(recall_port->automation,
+                                                      automation);
+         g_object_ref(automation); 
+       }
       }else{
        automation = AGS_AUTOMATION(list_automation->data);
       }
@@ -1778,8 +1852,8 @@
        while(child != NULL){
          if(child->type == XML_ELEMENT_NODE){
            if(!xmlStrncmp(child->name,
-                          "note",
-                          5)){
+                          "acceleration",
+                          13)){
              guint tmp;
 
              tmp = g_ascii_strtoull(xmlGetProp(child,
@@ -1797,7 +1871,7 @@
        }
 
        x_boundary = g_ascii_strtoull(xmlGetProp(automation_node,
-                                                "x_boundary"),
+                                                "x-boundary"),
                                      NULL,
                                      10);
 
@@ -1830,8 +1904,8 @@
        while(child != NULL){
          if(child->type == XML_ELEMENT_NODE){
            if(!xmlStrncmp(child->name,
-                          "note",
-                          5)){
+                          "acceleration",
+                          13)){
              guint tmp;
 
              tmp = g_ascii_strtoull(xmlGetProp(child,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gsequencer-1.4.34/ags/X/ags_notation_editor.c 
new/gsequencer-1.4.35/ags/X/ags_notation_editor.c
--- old/gsequencer-1.4.34/ags/X/ags_notation_editor.c   2018-07-06 
16:59:47.000000000 +0200
+++ new/gsequencer-1.4.35/ags/X/ags_notation_editor.c   2018-08-09 
23:09:09.000000000 +0200
@@ -1211,6 +1211,7 @@
        notation->timestamp->timer.ags_offset.offset = 
timestamp->timer.ags_offset.offset;
        machine->audio->notation = ags_notation_add(machine->audio->notation,
                                                    notation);
+       g_object_ref(notation);
       }else{
        notation = AGS_NOTATION(list_notation->data);
       }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gsequencer-1.4.34/ags/X/editor/ags_automation_edit_callbacks.c 
new/gsequencer-1.4.35/ags/X/editor/ags_automation_edit_callbacks.c
--- old/gsequencer-1.4.34/ags/X/editor/ags_automation_edit_callbacks.c  
2018-06-04 19:40:58.000000000 +0200
+++ new/gsequencer-1.4.35/ags/X/editor/ags_automation_edit_callbacks.c  
2018-08-09 23:09:09.000000000 +0200
@@ -80,7 +80,7 @@
     zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) 
automation_toolbar->zoom));
 
     /* cursor position */
-    automation_edit->cursor_position_x = (guint) (zoom_factor * (event->x + 
GTK_RANGE(automation_edit->hscrollbar)->adjustment->value)) / 
automation_edit->control_width;
+    automation_edit->cursor_position_x = (guint) (zoom_factor * (event->x + 
GTK_RANGE(automation_edit->hscrollbar)->adjustment->value));
     
     if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){
       automation_edit->cursor_position_y = 
log(((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) 
/ g_range) * c_range);
@@ -211,7 +211,7 @@
     zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) 
automation_toolbar->zoom));
 
     /* cursor position */
-    automation_edit->cursor_position_x = (guint) (zoom_factor * (event->x + 
GTK_RANGE(automation_edit->hscrollbar)->adjustment->value)) / 
automation_edit->control_width;
+    automation_edit->cursor_position_x = (guint) (zoom_factor * (event->x + 
GTK_RANGE(automation_edit->hscrollbar)->adjustment->value));
     
     if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){
       automation_edit->cursor_position_y = 
log(((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) 
/ g_range) * c_range);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gsequencer-1.4.34/ags/X/file/ags_simple_file.c 
new/gsequencer-1.4.35/ags/X/file/ags_simple_file.c
--- old/gsequencer-1.4.34/ags/X/file/ags_simple_file.c  2018-07-06 
16:59:47.000000000 +0200
+++ new/gsequencer-1.4.35/ags/X/file/ags_simple_file.c  2018-08-09 
23:09:09.000000000 +0200
@@ -5615,7 +5615,7 @@
 
        parameter = NULL;
 
-       ags_simple_file_read_preset(simple_file, child, &parameter);
+       ags_simple_file_read_property(simple_file, child, &parameter);
 
        ags_preset_add_parameter(gobject,
                                 parameter->name, &(parameter->value));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gsequencer-1.4.34/ags/X/import/ags_track_collection_mapper.c 
new/gsequencer-1.4.35/ags/X/import/ags_track_collection_mapper.c
--- old/gsequencer-1.4.34/ags/X/import/ags_track_collection_mapper.c    
2018-07-06 16:59:47.000000000 +0200
+++ new/gsequencer-1.4.35/ags/X/import/ags_track_collection_mapper.c    
2018-08-09 23:09:09.000000000 +0200
@@ -455,10 +455,8 @@
   AgsGuiThread *gui_thread;
 
   AgsApplicationContext *application_context;
-
-  xmlNode *clipboard;
   
-  GList *notation, *imported_notation;
+  GList *imported_notation;
   
   gchar *machine_type;
   
@@ -513,18 +511,15 @@
 
   /* apply notation */
   imported_notation = track_collection_mapper->notation;
-  notation = machine->audio->notation;
+  g_list_free_full(machine->audio->notation,
+                  g_object_unref);
 
-  ags_notation_add_all_to_selection(imported_notation->data);
-  clipboard = ags_notation_copy_selection(imported_notation->data);
+  machine->audio->notation = imported_notation;
   
-  while(notation != NULL){
-    ags_notation_insert_from_clipboard(notation->data,
-                                      clipboard,
-                                      0, 0,
-                                      0, 0);
+  while(imported_notation != NULL){
+    g_object_ref(imported_notation->data);
     
-    notation = notation->next;
+    imported_notation = imported_notation->next;
   }
 
   /* add audio */  
@@ -599,6 +594,8 @@
 
   AgsNotation *current_notation;
   AgsNote *note;
+  
+  AgsTimestamp *timestamp;
 
   xmlNode *current, *child;
   GList *track, *notation_start, *notation;
@@ -607,6 +604,7 @@
   guint audio_channels;
   guint n_key_on, n_key_off;
   guint x, y, velocity;
+  guint prev_x;
   guint default_length;
   guint i;
   gboolean pattern;
@@ -625,8 +623,8 @@
   for(i = 0; i < audio_channels; i++){
     current_notation = ags_notation_new(NULL,
                                        i);
-    notation_start = g_list_prepend(notation_start,
-                                   current_notation);
+    notation_start = ags_notation_add(notation_start,
+                                     current_notation);
   }
 
   track_collection_mapper->notation = notation_start;
@@ -639,11 +637,19 @@
   if(default_length == 0){
     default_length = 1;
   }
+
+  timestamp = ags_timestamp_new();
+
+  timestamp->flags &= (~AGS_TIMESTAMP_UNIX);
+  timestamp->flags |= AGS_TIMESTAMP_OFFSET;
+
+  timestamp->timer.ags_offset.offset = 0;
+  
+  prev_x = 0;
   
   while(track != NULL){
     current = track->data;
     
-    notation = notation_start;
     child = current->children;
 
     while(child != NULL){
@@ -668,7 +674,7 @@
 
          notation = notation_start;
          
-         while(notation != NULL){
+         for(i = 0; i < audio_channels; i++){
            note = ags_note_new();
            note->x[0] = x;
            note->x[1] = x + default_length;
@@ -676,7 +682,23 @@
            ags_complex_set(&(note->attack),
                            velocity);
 
-           ags_notation_add_note(notation->data,
+           if(x >= prev_x + AGS_NOTATION_DEFAULT_OFFSET){
+             current_notation = ags_notation_new(NULL,
+                                                 i);
+             current_notation->timestamp->timer.ags_offset.offset = 
AGS_NOTATION_DEFAULT_OFFSET * floor(x / AGS_NOTATION_DEFAULT_OFFSET);
+             
+             notation_start = ags_notation_add(notation_start,
+                                               current_notation);
+
+           }else{
+             timestamp->timer.ags_offset.offset = AGS_NOTATION_DEFAULT_OFFSET 
* floor(x / AGS_NOTATION_DEFAULT_OFFSET);
+
+             notation = ags_notation_find_near_timestamp(notation_start, i,
+                                                         timestamp);
+             current_notation = notation->data;
+           }
+           
+           ags_notation_add_note(current_notation,
                                  note,
                                  FALSE);
            
@@ -703,25 +725,31 @@
                                              NULL,
                                              10);
          
-         while(notation != NULL){
-           list = ags_note_find_prev(AGS_NOTATION(notation->data)->notes,
-                                     x, y);
-
-           if(list != NULL){
-             note = list->data;
-
-             if(note->x[0] == x){
-               note->x[1] = x + 1;
-             }else{
-               note->x[1] = x;
-             }
+         for(i = 0; i < audio_channels; i++){
+           notation = g_list_last(notation_start);
+
+           while(notation != NULL){
+             list = ags_note_find_prev(AGS_NOTATION(notation->data)->notes,
+                                       x, y);
+
+             if(list != NULL){
+               note = list->data;
+
+               if(note->x[0] == x){
+                 note->x[1] = x + 1;
+               }else{
+                 note->x[1] = x;
+               }
              
-             note->y = y;
-             ags_complex_set(&(note->release),
-                             velocity);
-           }
+               note->y = y;
+               ags_complex_set(&(note->release),
+                               velocity);
+
+               break;
+             }
            
-           notation = notation->next;
+             notation = notation->prev;
+           }
          }
          
          n_key_off++;
@@ -734,6 +762,8 @@
     track = track->next;
   }
 
+  g_object_unref(timestamp);
+  
   /* populate machine_type */
   gtk_combo_box_text_append_text(track_collection_mapper->machine_type,
                                 g_type_name(AGS_TYPE_SYNCSYNTH));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gsequencer-1.4.34/ags/audio/ags_automation.c 
new/gsequencer-1.4.35/ags/audio/ags_automation.c
--- old/gsequencer-1.4.34/ags/audio/ags_automation.c    2018-07-06 
16:59:47.000000000 +0200
+++ new/gsequencer-1.4.35/ags/audio/ags_automation.c    2018-08-09 
23:09:09.000000000 +0200
@@ -2045,8 +2045,8 @@
                    format) ||
         !xmlStrcmp(AGS_AUTOMATION_CLIPBOARD_LEGACY_FORMAT,
                    format)){
-       x_boundary = xmlGetProp(automation_node, "x_boundary");
-       y_boundary = xmlGetProp(automation_node, "y_boundary");
+       x_boundary = xmlGetProp(automation_node, "x-boundary");
+       y_boundary = xmlGetProp(automation_node, "y-boundary");
 
        ags_automation_insert_native_scale_from_clipboard(automation,
                                                          automation_node, 
version,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gsequencer-1.4.34/ags/test/audio/ags_automation_test.c 
new/gsequencer-1.4.35/ags/test/audio/ags_automation_test.c
--- old/gsequencer-1.4.34/ags/test/audio/ags_automation_test.c  2018-06-04 
19:40:58.000000000 +0200
+++ new/gsequencer-1.4.35/ags/test/audio/ags_automation_test.c  2018-07-09 
15:58:33.000000000 +0200
@@ -163,6 +163,7 @@
 ags_automation_test_init_suite()
 {
   audio = ags_audio_new(NULL);
+  g_object_ref(audio);
   
   return(0);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gsequencer-1.4.34/ags/test/thread/ags_thread_pool_test.c 
new/gsequencer-1.4.35/ags/test/thread/ags_thread_pool_test.c
--- old/gsequencer-1.4.34/ags/test/thread/ags_thread_pool_test.c        
2018-06-04 19:40:58.000000000 +0200
+++ new/gsequencer-1.4.35/ags/test/thread/ags_thread_pool_test.c        
2018-07-10 00:12:21.000000000 +0200
@@ -20,12 +20,15 @@
 #include <glib.h>
 #include <glib-object.h>
 
-#include <ags/libags.h>
-
 #include <CUnit/CUnit.h>
 #include <CUnit/Automated.h>
 #include <CUnit/Basic.h>
 
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <ags/libags.h>
+
 int ags_thread_pool_test_init_suite();
 int ags_thread_pool_test_clean_suite();
 
@@ -65,8 +68,10 @@
   AgsThread *parent;
   AgsReturnableThread *returnable_thread;
 
-  parent = g_object_new(AGS_TYPE_THREAD,
+  parent = g_object_new(AGS_TYPE_GENERIC_MAIN_LOOP,
                        NULL);
+  ags_connectable_connect(AGS_CONNECTABLE(parent));
+  ags_thread_start(parent);
   
   thread_pool = ags_thread_pool_new(parent);
   ags_thread_pool_start(thread_pool);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gsequencer-1.4.34/ags/test/thread/ags_thread_test.c 
new/gsequencer-1.4.35/ags/test/thread/ags_thread_test.c
--- old/gsequencer-1.4.34/ags/test/thread/ags_thread_test.c     2018-07-06 
17:20:46.000000000 +0200
+++ new/gsequencer-1.4.35/ags/test/thread/ags_thread_test.c     2018-07-09 
16:42:49.000000000 +0200
@@ -180,7 +180,7 @@
   }
 
   /* wait until all waiting */
-  while(n_waiting < AGS_THREAD_TEST_SYNC_N_THREADS + 1){
+  while(g_atomic_int_get(&n_waiting) < AGS_THREAD_TEST_SYNC_N_THREADS + 1){
     usleep(4);
   }
 
@@ -211,7 +211,7 @@
   }
 
   /* wait until all waiting */
-  while(n_waiting < AGS_THREAD_TEST_SYNC_N_THREADS + 1){
+  while(g_atomic_int_get(&n_waiting) < AGS_THREAD_TEST_SYNC_N_THREADS + 1){
     usleep(4);
   }
 
@@ -242,7 +242,7 @@
   }
 
   /* wait until all waiting */
-  while(n_waiting < AGS_THREAD_TEST_SYNC_N_THREADS + 1){
+  while(g_atomic_int_get(&n_waiting) < AGS_THREAD_TEST_SYNC_N_THREADS + 1){
     usleep(4);
   }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gsequencer-1.4.34/ags/thread/ags_thread-posix.c 
new/gsequencer-1.4.35/ags/thread/ags_thread-posix.c
--- old/gsequencer-1.4.34/ags/thread/ags_thread-posix.c 2018-07-06 
17:23:02.000000000 +0200
+++ new/gsequencer-1.4.35/ags/thread/ags_thread-posix.c 2018-07-09 
16:11:06.000000000 +0200
@@ -3133,7 +3133,7 @@
     pthread_mutex_lock(thread->start_mutex);
       
     g_atomic_int_set(&(thread->start_done),
-                    TRUE);    
+                    TRUE);
       
     if(g_atomic_int_get(&(thread->start_wait)) == TRUE){
       pthread_cond_broadcast(thread->start_cond);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gsequencer-1.4.34/ags/thread/ags_thread_pool.c 
new/gsequencer-1.4.35/ags/thread/ags_thread_pool.c
--- old/gsequencer-1.4.34/ags/thread/ags_thread_pool.c  2018-07-04 
20:22:02.000000000 +0200
+++ new/gsequencer-1.4.35/ags/thread/ags_thread_pool.c  2018-07-09 
23:47:38.000000000 +0200
@@ -393,6 +393,11 @@
   pthread_cond_destroy(thread_pool->idle_cond);
   free(thread_pool->idle_cond);
 
+  /* parent */
+  if(thread_pool->parent != NULL){
+    g_object_unref(thread_pool->parent);
+  }
+  
   /* returnable thread */
   g_list_free_full(g_atomic_pointer_get(&(thread_pool->returnable_thread)),
                   g_object_unref);
@@ -499,20 +504,23 @@
       ags_connectable_connect(AGS_CONNECTABLE(returnable_thread));
 
       ags_thread_start(returnable_thread);
-
+      
       /* wait returnable_thread */
       pthread_mutex_lock(returnable_thread->start_mutex);
 
-      g_atomic_int_set(&(returnable_thread->start_wait),
-                      TRUE);
+      if(g_atomic_int_get(&(returnable_thread->start_done)) == FALSE){
+       g_atomic_int_set(&(returnable_thread->start_wait),
+                        TRUE);
        
-      if(g_atomic_int_get(&(returnable_thread->start_wait)) == TRUE &&
-        g_atomic_int_get(&(returnable_thread->start_done)) == FALSE){
        while(g_atomic_int_get(&(returnable_thread->start_wait)) == TRUE &&
              g_atomic_int_get(&(returnable_thread->start_done)) == FALSE){
          pthread_cond_wait(returnable_thread->start_cond,
                            returnable_thread->start_mutex);
        }
+
+       g_atomic_int_set(&(returnable_thread->start_wait),
+                        FALSE);
+      
       }
 
       pthread_mutex_unlock(returnable_thread->start_mutex);
@@ -587,9 +595,9 @@
   /*  */
   pthread_mutex_lock(thread_pool->creation_mutex);
 
-  if(g_atomic_pointer_get(&(thread_pool->returnable_thread)) == NULL){
-    g_atomic_int_inc(&(thread_pool->queued));
+  g_atomic_int_inc(&(thread_pool->queued));
 
+  if(g_atomic_pointer_get(&(thread_pool->returnable_thread)) == NULL){
     while(g_atomic_int_get(&(thread_pool->queued)) != 0 &&
          g_atomic_pointer_get(&(thread_pool->returnable_thread)) == NULL){
       pthread_cond_wait(thread_pool->creation_cond,
@@ -601,8 +609,8 @@
   returnable_thread = list->data;
   g_atomic_pointer_set(&(thread_pool->returnable_thread),
                       
g_list_remove(g_atomic_pointer_get(&(thread_pool->returnable_thread)),
-                                                         returnable_thread));
-
+                                    returnable_thread));
+  
   g_atomic_int_dec_and_test(&(thread_pool->queued));
   pthread_mutex_unlock(thread_pool->creation_mutex);
 
@@ -657,7 +665,7 @@
                  AGS_THREAD_POOL_RUNNING);
 
   pthread_create(thread_pool->thread, NULL,
-                &(ags_thread_pool_creation_thread), thread_pool);
+                ags_thread_pool_creation_thread, thread_pool);
 
   list = g_atomic_pointer_get(&(thread_pool->returnable_thread));
   
@@ -736,7 +744,10 @@
   thread_pool = (AgsThreadPool *) g_object_new(AGS_TYPE_THREAD_POOL,
                                               NULL);
 
-  thread_pool->parent = parent;
-
+  if(thread_pool->parent != NULL){
+    thread_pool->parent = parent;
+    g_object_ref(parent);
+  }
+  
   return(thread_pool);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gsequencer-1.4.34/ags/thread/ags_thread_pool.h 
new/gsequencer-1.4.35/ags/thread/ags_thread_pool.h
--- old/gsequencer-1.4.34/ags/thread/ags_thread_pool.h  2018-06-04 
19:40:58.000000000 +0200
+++ new/gsequencer-1.4.35/ags/thread/ags_thread_pool.h  2018-07-09 
16:57:57.000000000 +0200
@@ -38,8 +38,8 @@
 #define AGS_IS_THREAD_POOL_CLASS(class)     (G_TYPE_CHECK_CLASS_TYPE ((class), 
AGS_TYPE_THREAD_POOL))
 #define AGS_THREAD_POOL_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS(obj, 
AGS_TYPE_THREAD_POOL, AgsThreadPoolClass))
 
-#define AGS_THREAD_POOL_DEFAULT_MAX_UNUSED_THREADS 4
-#define AGS_THREAD_POOL_DEFAULT_MAX_THREADS 1024
+#define AGS_THREAD_POOL_DEFAULT_MAX_UNUSED_THREADS (4)
+#define AGS_THREAD_POOL_DEFAULT_MAX_THREADS (1024)
 
 #ifndef AGS_THREAD_POOL_RT_PRIORITY
 #define AGS_THREAD_POOL_RT_PRIORITY (99)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gsequencer-1.4.34/configure 
new/gsequencer-1.4.35/configure
--- old/gsequencer-1.4.34/configure     2018-07-06 17:00:46.000000000 +0200
+++ new/gsequencer-1.4.35/configure     2018-08-09 23:09:54.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gsequencer 1.4.34.
+# Generated by GNU Autoconf 2.69 for gsequencer 1.4.35.
 #
 # Report bugs to <[email protected]>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='gsequencer'
 PACKAGE_TARNAME='gsequencer'
-PACKAGE_VERSION='1.4.34'
-PACKAGE_STRING='gsequencer 1.4.34'
+PACKAGE_VERSION='1.4.35'
+PACKAGE_STRING='gsequencer 1.4.35'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL=''
 
@@ -1473,7 +1473,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures gsequencer 1.4.34 to adapt to many kinds of systems.
+\`configure' configures gsequencer 1.4.35 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1548,7 +1548,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gsequencer 1.4.34:";;
+     short | recursive ) echo "Configuration of gsequencer 1.4.35:";;
    esac
   cat <<\_ACEOF
 
@@ -1741,7 +1741,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gsequencer configure 1.4.34
+gsequencer configure 1.4.35
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2218,7 +2218,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by gsequencer $as_me 1.4.34, which was
+It was created by gsequencer $as_me 1.4.35, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3085,7 +3085,7 @@
 
 # Define the identity of the package.
  PACKAGE='gsequencer'
- VERSION='1.4.34'
+ VERSION='1.4.35'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -19597,7 +19597,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by gsequencer $as_me 1.4.34, which was
+This file was extended by gsequencer $as_me 1.4.35, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -19663,7 +19663,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-gsequencer config.status 1.4.34
+gsequencer config.status 1.4.35
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gsequencer-1.4.34/configure.ac 
new/gsequencer-1.4.35/configure.ac
--- old/gsequencer-1.4.34/configure.ac  2018-07-06 17:00:28.000000000 +0200
+++ new/gsequencer-1.4.35/configure.ac  2018-07-09 16:18:11.000000000 +0200
@@ -6,7 +6,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.69])
-AC_INIT([gsequencer],[1.4.34],[[email protected]])
+AC_INIT([gsequencer],[1.4.35],[[email protected]])
 AM_INIT_AUTOMAKE([subdir-objects])
 AC_CONFIG_SRCDIR([ags/config.h.in])
 AC_CONFIG_HEADERS([ags/config.h])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gsequencer-1.4.34/po/gsequencer.pot 
new/gsequencer-1.4.35/po/gsequencer.pot
--- old/gsequencer-1.4.34/po/gsequencer.pot     2018-07-06 18:58:17.000000000 
+0200
+++ new/gsequencer-1.4.35/po/gsequencer.pot     2018-08-09 23:10:55.000000000 
+0200
@@ -6,9 +6,9 @@
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: gsequencer 1.4.34\n"
+"Project-Id-Version: gsequencer 1.4.35\n"
 "Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2018-07-06 18:58+0200\n"
+"POT-Creation-Date: 2018-08-09 23:10+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <[email protected]>\n"


Reply via email to