Commit df6cae66 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

libvlc: ref_count should only be accessed in the lock.

parent a2b1a6f8
...@@ -165,9 +165,8 @@ void libvlc_release( libvlc_instance_t *p_instance ) ...@@ -165,9 +165,8 @@ void libvlc_release( libvlc_instance_t *p_instance )
vlc_mutex_t *lock = &p_instance->instance_lock; vlc_mutex_t *lock = &p_instance->instance_lock;
int refs; int refs;
assert( p_instance->ref_count > 0 );
vlc_mutex_lock( lock ); vlc_mutex_lock( lock );
assert( p_instance->ref_count > 0 );
refs = --p_instance->ref_count; refs = --p_instance->ref_count;
vlc_mutex_unlock( lock ); vlc_mutex_unlock( lock );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment