Commit b28c3623 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

dvdnav: fully fix the still image assertion

This completes 24ae7ed5. Even if the
timer is removed from the schedule, there is no warranty that it's not
pending execution, or waiting on our mutex, at the very moment.
So there is a small window of opportunity for the assertion to fail.

This removes the assertion in favor of a safer if(likely()).
parent 8855ec28
......@@ -1259,9 +1259,11 @@ static void StillTimer( void *p_data )
demux_sys_t *p_sys = p_data;
vlc_mutex_lock( &p_sys->still.lock );
assert( p_sys->still.b_enabled );
p_sys->still.b_enabled = false;
dvdnav_still_skip( p_sys->dvdnav );
if( likely(p_sys->still.b_enabled) )
{
p_sys->still.b_enabled = false;
dvdnav_still_skip( p_sys->dvdnav );
}
vlc_mutex_unlock( &p_sys->still.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