[xiph-commits] r17676 - trunk/squishyball

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Sun Nov 28 18:16:15 PST 2010


Author: xiphmont
Date: 2010-11-28 18:16:15 -0800 (Sun, 28 Nov 2010)
New Revision: 17676

Modified:
   trunk/squishyball/main.c
Log:
Correct straightforward logic bug that would cause main thread to never sleep.



Modified: trunk/squishyball/main.c
===================================================================
--- trunk/squishyball/main.c	2010-11-29 00:42:11 UTC (rev 17675)
+++ trunk/squishyball/main.c	2010-11-29 02:16:15 UTC (rev 17676)
@@ -899,7 +899,7 @@
       }
 
       /* wait */
-      if(!state.key_waiting && state.fragment_size>0)
+      if((!state.key_waiting || do_flip || do_pause || do_select) && state.fragment_size>0)
         pthread_cond_wait(&state.main_cond,&state.mutex);
     }
   }
@@ -948,6 +948,13 @@
 
   pthread_join(playback_handle,NULL);
   pthread_join(fd_handle,NULL);
+  free(fadewindow1);
+  free(fadewindow2);
+  free(fadewindow3);
+  free(beep1);
+  free(beep2);
+  free(fragmentA);
+  free(fragmentB);
   for(i=0;i<test_files;i++)
     free_pcm(pcm[i]);
   return 0;



More information about the commits mailing list