[Libav-user] Why av_seek_frame with AVSEEK_FLAG_BACKWARD sometimes seeks to "NEXT" keyframe?

Mute Orange orange4glace at gmail.com
Thu Mar 28 06:16:24 EET 2019


When call av_seek_frame with AVSEEK_FALG_BACKWARD, its expected behavior
should be seek to "backward" keyframe of requested time.

But sometimes, it seeks to its "next" keyframe, not "backward". (might be
when the requested time is just ONE frame before the time of its next
keyframe, see
https://stackoverflow.com/questions/20734814/ffmpeg-av-seek-frame-with-avseek-flag-any-causes-grey-screen
)

Is this an expected behavior? if then, what is the correct way to seek to
its backward keyframe?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190328/b59b192f/attachment.html>


More information about the Libav-user mailing list