This completes
24ae7ed55e206a37571d0d39a3d21353936f9a64. 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()).
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 );
}