<div dir="ltr">You also need to flush the codec contexts.  <br>av_flush_buffer<br><a href="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/17549">http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/17549</a><br>
<br><div>also you probably need SEEK_BACKWARD ... I found that seek( 0, SEEK_ANY ) would skip the first keyframe</div><div><br></div><div>There is also av_seek_file()  <br></div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Aug 28, 2014 at 11:35 PM, Lyndon Hill <span dir="ltr"><<a href="mailto:emptystate-at-yahoo.co.uk@ffmpeg.org" target="_blank">emptystate-at-yahoo.co.uk@ffmpeg.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
What is the best (most universal) way to rewind a file to the start ?<br>
<br>
Currently I am using<br>
<br>
av_seek_frame(formatContext, videoStream, 0, AVSEEK_FLAG_ANY);<br>
<br>
<br>
However, in an HEVC bit stream, there are no timestamps (as interpreted by x265) so this method will not work.<br>
<br>
Thanks in advance<br>
<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</blockquote></div><br></div>