title: cv::VideoCapture::set failed on image sequence
body: <p>I am trying to use a cursor to seek a specific frame in stream.</p>
  
  <p><em>main.cpp</em> code follows:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;opencv2/opencv.hpp&gt;
  
  int main()
  {
    cv::VideoCapture cap;
  
    if (!cap.open("8%d.jpg"))
      return 1;
  
    double index = cap.get(CV_CAP_PROP_POS_FRAMES);
  
    index += 10.0;    
    std::cout &lt;&lt; "Seek to index: " &lt;&lt; std::endl;
  
    if ( !(index &lt; cap.get(CV_CAP_PROP_FRAME_COUNT)) )
      return 1;
  
    bool retval = cap.set(CV_CAP_PROP_POS_FRAMES, index);
    assert(retval);
  
    std::cout &lt;&lt; cap.get(CV_CAP_PROP_POS_FRAMES) &lt;&lt; std::endl;
  
    cap.release();
    return 0;
  }
  </code></pre>
  
  <p>Command line on Ubuntu 14.4.3 LTS with OpenCV 2.4.11:</p>
  
  <pre><code>g++ main.cpp `pkg-config --cflags --libs opencv`
  </code></pre>
  
  <p>Command to check returning value:</p>
  
  <pre><code>echo "$#"
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Seek to index: 10
  -9.223377e+18
  </code></pre>
  
  <p><code>cv::VideoCapture::set</code> function on an image sequence seems to break the stream, can you tell me why ?</p>
  
  <p>Note: It works for a video as input but not an image sequence!</p>
  
  <p>PS: I prefer asking before looking inside OpenCV-FFmpeg source code (it could take a while).</p>