+ // 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();
+