<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span><br></span></div><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> Thomas <zengaja@gmx.de><br> <b><span style="font-weight: bold;">To:</span></b> "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." <libav-user@ffmpeg.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, July 18, 2013 8:55 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Libav-user] How to decode arbitrary frame<br> </font> </div> <div class="y_msg_container"><br><div id="yiv8486094409">
  

    
  
  <div>>You can use avformat_seek_file() followed by avcodec_flush_buffers()
    before av_read_frame() to jump to an arbitrary position in the
    Stream.<br>
    <br>Thank you.  That works.  But I have an question.  Will avformat_seek_file()<br>seek to the exact frame, or merely to the nearest key frame?  I'm coding a<br>video editor and I need to seek to exact frames.  My input<br></div></div>format, for now, are raw formats where all frames are stored in<br>full such as rawuyvy, or raw422P.  Will avformat_seek_file()<br>seek to the exact frame in those raw formats, and will it also<br>seek to the exact frame if I use it on MPEG-type formats?<br><br>Thank you.<br><br></div> </div> </div>  </div></body></html>