title: libvlc: how to snap a frame at any time
body: <p>Now my method is:</p>
  
  <pre><code>libvlc_video_set_callbacks //set the lock,unlock,display callback functions
  libvlc_media_player_set_position //goto the snap time
  libvlc_media_player_play  //start playing
  </code></pre>
  
  <p>then in unlock callback function invoke <code>'libvlc_media_player_stop'</code> to stop the play, and save the data which provider by display callback function.</p>
  
  <p>This method had succeeded some times, but more times it will take my whole program crash. 
  I know it looks a bit stupid, but I cannot found any frame by frame control function in the <code>libvlc</code> include files.</p>