[Libav-user] a question for av_seek_frame

YIRAN LI mrfun.china at gmail.com
Mon Dec 9 03:44:25 CET 2013

Hi friends

Here I have a question about av_seek_frame.

For example if I have a video stream of time stamps 0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10. and only frame at 0 is a key frame.

if I call av_seek_frame(x,x,5, AVSEEK_FLAG_BACKWARD | AVSEEK_FLAG_ANY) and
then av_read_frame, the first frame I get will be frame 6, is this correct?

then if I call av_seek_frame(x, x, 5, AVSEEK_FLAG_BACKWARD) and then
av_read_frame, then the first frame I get will be frame 1, is this correct?

and if both can seek to a frame and first one can get a frame quicker, in
what circumstance should I use the second one?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20131209/02c710da/attachment.html>

More information about the Libav-user mailing list