You select forwards or backwards based on the desired outcome of where you want to land in the file (just past or just before the desired seek position). backwards will land you just before (or at) the seek position. forwards will land you just after. It makes since if you consider that there is no foreknowledge of whether a given frame is present as a keyframe--that can only be discovered by overshooting, unless you do the messy business of actually decoding frames, which would make for a terrible seek indeed.
On Sun, May 12, 2019 at 3:25 PM Mark McKay <[email protected]> wrote: > I have an AVFormatContext that I need to seek in. I've been using > av_seek_frame(), but so far have not been passing the AVSEEK_FLAG_BACKWARD > flag because I don't know how to figure out whether I need to seek forward or > backwards. Is there a way to query this from the AVFormatContext? > > Mark > > _______________________________________________ > Libav-user mailing list > [email protected] > https://ffmpeg.org/mailman/listinfo/libav-user > > To unsubscribe, visit link above, or email > [email protected] with subject "unsubscribe".
_______________________________________________ Libav-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
