]> git.sesse.net Git - mlt/blobdiff - src/modules/sdl/consumer_sdl_audio.c
Disable purging consumer on seek in sdl_audio.
[mlt] / src / modules / sdl / consumer_sdl_audio.c
index 508dcc7d0afefccf5ae2d7369c55a9768154596d..c9bc4acdce73deb31e4b29d62dacf3aa28c1cad4 100644 (file)
@@ -28,7 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <pthread.h>
-#include <SDL/SDL.h>
+#include <SDL.h>
 #include <sys/time.h>
 
 extern pthread_mutex_t mlt_sdl_mutex;
@@ -143,7 +143,7 @@ static void consumer_refresh_cb( mlt_consumer sdl, mlt_consumer parent, char *na
        {
                consumer_sdl this = parent->child;
                pthread_mutex_lock( &this->refresh_mutex );
-               this->refresh_count = this->refresh_count <= 0 ? 1 : this->refresh_count ++;
+               this->refresh_count = this->refresh_count <= 0 ? 1 : this->refresh_count + 1;
                pthread_cond_broadcast( &this->refresh_cond );
                pthread_mutex_unlock( &this->refresh_mutex );
        }
@@ -193,7 +193,9 @@ int consumer_stop( mlt_consumer parent )
                pthread_mutex_unlock( &this->refresh_mutex );
 
                // Cleanup the main thread
+#ifndef WIN32
                if ( this->thread )
+#endif
                        pthread_join( this->thread, NULL );
 
                // Unlatch the audio callback
@@ -539,8 +541,9 @@ static void *consumer_thread( void *arg )
                        // Optimisation to reduce latency
                        if ( speed == 1.0 )
                        {
-                               if ( last_position != -1 && last_position + 1 != mlt_frame_get_position( frame ) )
-                                       mlt_consumer_purge( consumer );
+                // TODO: disabled due to misbehavior on parallel-consumer
+//                             if ( last_position != -1 && last_position + 1 != mlt_frame_get_position( frame ) )
+//                                     mlt_consumer_purge( consumer );
                                last_position = mlt_frame_get_position( frame );
                        }
                        else