[Libav-user] How to properly seek in audio?

Anton Shekhovtsov shekh.anton at gmail.com
Wed May 11 16:46:26 CEST 2016


I used the following code: av_seek_frame(ctx, id, pos,

But it fails for pcm stream in avi file.
However I discovered that adding AVSEEK_FLAG_ANY solves the problem.
Apparently pcm data has no use for keyframes but this is disappointing.
What I`d like to know, is it safe to put AVSEEK_FLAG_ANY with all audio
formats without negative side effects? All I need is the next packet after
the seek must be healthy and its position <= pos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160511/85fbe68c/attachment.html>

More information about the Libav-user mailing list