title: ffmpeg avformat_open_input with custom stream object
body: <p>I'm currently trying to write a custom <code>SoundFileReader</code> for SFML using ffmpeg's libraries. The only thing I have available to use with avcodec and avformat is the class <code>InputStream</code> below which is part of SFML. I've looked at <code>avformat_open_input</code> and <code>AVIOContext</code> and I learned how to use custom stream with a buffer but how do I create an <code>AVIOContext</code> that works with the custom read, seek, and lseek functions?</p>
  
  <pre><code>class InputStream {
      int64_t getSize()
      int64_t read(void* data, int64_t size);
      int64_t seek(int64_t position);
      int64_t tell(); // Gets the stream position
  };
  </code></pre>