title: libvlc_media_player_set_position fails when seeking backward
body: <p>I'm using libvlc 3.0.0 (I've also tried 2.2.0) to capture frames from a h264 encoded mp4 file (does not include sound, only video frames) on Windows 7 with Visual Studio 2012. I can play, pause, stop and seek forward without any problem. But when I try to seek backwards, I run into problems:</p>
  
  <ol>
  <li><p>Scenario: If I only call <code>libvlc_media_player_set_position</code> (or <code>libvlc_media_player_set_time</code>), it seems like it goes to the position. But vlc stops sending frame received callbacks(in other words, the player freezes) until it reaches the same (or next) frame before the <code>libvlc_media_player_set_position</code> function called.</p>
  
  <pre><code>counter = 0;
  while (true)
  {
      sleep(40); // 25 hz
      ++counter;
      if(counter % 100 = 0)
      {
          // assuming current_position &gt; 0.1f
          libvlc_media_player_set_position(p_mi, 0.1f);
      }
  }
  </code></pre></li>
  <li><p>Scenario: I can make it work only if I first stop the player, then start playing from the beginning. </p>
  
  <pre><code>counter = 0;
  while (true)
  {
      sleep(40); // 25 hz
      ++counter;
      if(counter % 100 = 0)
      {
          // assuming current_position &gt; 0.1f
          libvlc_media_player_stop(p_mi);
          libvlc_media_player_play(p_mi);
          libvlc_media_player_set_position(p_mi, 0.1f);
      }
  }
  </code></pre>
  
  <p>The problem with this scenario is, if I keep backward positioning for a while, I get the error (vlc prints the error to the command line)
  <code>core decoder error: cannot continue streaming due to errors</code>. After this error it stops playing(freezes again), and the next time I try to seek, I get an "Access violation" error:
  <code>Unhandled exception at 0x... (libavcodec_plugin.dll) in vlctest.exe: 0xC0000005: Access violation reading location 0x00000040</code></p></li>
  </ol>
  
  <p>It feels wrong to first restart the video playback for seeking. Am I missing something?</p>
  
  <p>Thanks in advance!</p>