Hi all,<div><br></div><div>I am trying to implement custom IO call backs by using ByteIOContext in avio.h in order to support http sources.</div><div>The implementation of the most callbacks were pretty much straight forward, but I faced a problem while handling seek() operation with SEEK_END flag.<br>
<div>The problem is that there are some cases that we don't know the actual size of the source. (e.g. <a href="http://en.wikipedia.org/wiki/Chunked_transfer_encoding">http source which chunked transfer encoding</a>)</div>
<div><br></div><div>Regarding the callback for seek operation, I found some article which says:</div><div><a href="http://cdry.wordpress.com/2009/09/09/using-custom-io-callbacks-with-ffmpeg/">http://cdry.wordpress.com/2009/09/09/using-custom-io-callbacks-with-ffmpeg/</a></div>
<div>"<span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Verdana; font-size: 12px; line-height: 16px; background-color: rgb(255, 255, 255); ">int64_t SeekFunc(void *opaque, int64_t <a class="el" href="http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/metadata__compat_8c.html#ed7ea92f45bd273dde380a45ddced592" style="color: rgb(0, 102, 204); text-decoration: none; ">offset</a></span><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Verdana; font-size: 12px; line-height: 16px; background-color: rgb(255, 255, 255); ">, int whence) ;</span></div>
<div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Verdana; font-size: 12px; line-height: 16px; background-color: rgb(255, 255, 255); ">you must return the current position of your stream  in bytes (that is, after the seeking is performed). If the seek has failed you must return <0."</span></div>
<br>So, my question is:<br>1. Will it be okay to return -1 if we don't know the actual size of the source?</div><div>2. If so, will the ffmpeg demux code just fail to demux the source or treat it as streaming source and continue parsing?</div>
<div><br></div><div>Any comments are welcome!</div><div>Thanks,</div><div>-- <br>Dongwon Kang<br><br>
</div>