<div dir="ltr"><div dir="ltr">What do you mean by "when you seek with MY software"?<br></div><div dir="ltr"><div><br></div><div>Have you tried "avio_seek"?</div><div><a href="https://www.ffmpeg.org/doxygen/2.5/avio_8h.html#a03e23bf0144030961c34e803c71f614f">https://www.ffmpeg.org/doxygen/2.5/avio_8h.html#a03e23bf0144030961c34e803c71f614f</a>  <br></div></div><div><br></div><div>And I don't think it is, but if what you mean is that you want to act when your software makes a call to ffmpeg that causes it to seek. You can set up a "AVIOContext::seek" callback that will tell you details about that callback:<br><a href="https://www.ffmpeg.org/doxygen/3.1/structAVIOContext.html#a0b4f06675c3ea2df5b455bd3334244fe">https://www.ffmpeg.org/doxygen/3.1/structAVIOContext.html#a0b4f06675c3ea2df5b455bd3334244fe</a></div><div><br></div><div>-Matt</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 22, 2020 at 5:15 AM Alexis <<a href="mailto:alexis.tran9713@gmail.com">alexis.tran9713@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi there,</div><div><br></div><div>I'm using FFMPEG (with a custom IO, so not a file but byte as input) to decode video in my software.</div><div><br></div><div>So when I seek with MY software, i just send corresponding bytes to the decoder, how can i tell to my decoder that i seeked? <br></div><div><br></div><div>When i seek i flush the buffer with: <br></div><div>
avcodec_send_packet() 
with null as packet to enter in the draining mode <br></div><div>and read until EOF</div><div>then avcodec_flush_buffers</div><div><br></div><div>It looks like it clean properly.</div><div><br></div><div>Then come the real problem, the next frame given by the decoder have a timestamp corresponding to before the seek, I guess the decoder have an incomplete frame in his own buffer waiting to be completed before outputting it, but how can i clear this?<br></div><div><br></div><div>I'm missing something? <br></div></div>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="https://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">https://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</blockquote></div><br></div>