]> git.sesse.net Git - mlt/blobdiff - src/modules/sdl/consumer_sdl_audio.c
Fix build on non-OSX due to missing parameter name.
[mlt] / src / modules / sdl / consumer_sdl_audio.c
index cd6052f1c76bc888bd4847d629ed4fa799f3bcf4..9550ea6a45814c303a52312f1dd94b03a8e5fefe 100644 (file)
@@ -100,9 +100,10 @@ mlt_consumer consumer_sdl_audio_init( mlt_profile profile, mlt_service_type type
                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 );
@@ -522,9 +523,12 @@ static void *consumer_thread( void *arg )
                                        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 )
@@ -578,6 +582,10 @@ static void consumer_close( mlt_consumer parent )
        // 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 );