<div dir="ltr">Hi,<div><br></div><div>I'm encountering a problem when using the latest source (and some older versions, so I know it's something I'm doing wrong, and not a bug), but I'm completely stumped and hoping someone will be able to help!</div><div><br></div><div>My custom IO looks exactly like this:</div><div><br></div><div><a href="https://www.codeproject.com/tips/489450/creating-custom-ffmpeg-io-context">https://www.codeproject.com/tips/489450/creating-custom-ffmpeg-io-context</a><br></div><div><br></div><div>When opening an AVI (MP4, XVID), if I don't supply a seek function in my call to avio_alloc_context, then the file opens and starts playing straight away.  However, I can't seek without reading the rest of the file up until the seek point, i.e. it doesn't seek, it just keeps reading.</div><div><br></div><div>If, on the other hand, I do supply a seek function, then seeking is fast.  But, the file takes a really long time to load.  It looks like it's taking a long time for the read_header call inside <span style="color:rgb(0,0,0);font-family:menlo;font-size:9pt">avformat_open_input to complete.</span></div><div><span style="color:rgb(0,0,0);font-family:menlo;font-size:9pt"><br></span></div><div><font color="#000000" face="menlo"><span style="font-size:12px">I'm not an expert in video file formats, but I've ruled out the possibility that this file can't be seeked quickly because any other clients I've seen can do so with this same file.  </span></font></div><div><font color="#000000" face="menlo"><span style="font-size:12px"><br></span></font></div><div><font color="#000000" face="menlo"><span style="font-size:12px">Apologies for such a vague question.  I don't even know what code I could send you as I can't imagine what could be the source of this problem outside of my custom IO, but that code seems to be the same as other projects.  Would anyone be able to point me in the right direction of where to look, and prevent me from tearing out the scant remainder of my hair!?</span></font></div><div><font color="#000000" face="menlo"><span style="font-size:12px"><br></span></font></div><div><font color="#000000" face="menlo"><span style="font-size:12px">Many thanks,</span></font></div><div><font color="#000000" face="menlo"><span style="font-size:12px">D</span></font></div></div>