// Register our get_frame implementation
producer->get_frame = producer_get_frame;
+ // init mutexes
+ pthread_mutex_init( &self->audio_mutex, NULL );
+ pthread_mutex_init( &self->video_mutex, NULL );
+ pthread_mutex_init( &self->packets_mutex, NULL );
+ pthread_mutex_init( &self->open_mutex, NULL );
+
+ // init queues
+ self->apackets = mlt_deque_init();
+ self->vpackets = mlt_deque_init();
+
if ( strcmp( service, "avformat-novalidate" ) )
{
// Open the file
// Lock the service
if ( take_lock )
{
- pthread_mutex_init( &self->audio_mutex, NULL );
- pthread_mutex_init( &self->video_mutex, NULL );
- pthread_mutex_init( &self->packets_mutex, NULL );
- pthread_mutex_init( &self->open_mutex, NULL );
pthread_mutex_lock( &self->audio_mutex );
pthread_mutex_lock( &self->video_mutex );
}
}
if ( filename )
free( filename );
- if ( !error )
- {
- self->apackets = mlt_deque_init();
- self->vpackets = mlt_deque_init();
- }
if ( self->dummy_context )
{