<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Is there a way of knowing whether I seek outside of a video when using the SEEK_BACKWARD flag?</div><div class=""><br class=""></div>I noticed that when I change the flag for av_seek_frame to something else than AVSEEK_FLAG_ANY, I always get 0 returned. If I seek somewhere beyond the video length, I can even can call avcodec_decode_video2 afterwards and get a frame decode (just zeros it seems), without any complains. Only sws_scale() later in the pipeline gives a warning about incorrect image pointers.<div class=""><br class=""></div><div class="">For now I worked around by calling av_seek_frame with AVSEEK_FLAG_ANY and if that is successful, seek again with SEEK_BACKWARD. But ideally, I would like to seek only once. Is there reason why only AVSEEK_FLAG_ANY detects if a seek was successful? I.e. is there a possibility that ticket #1607 [0] could be fixed?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Is there maybe a function I have overlooked that I can call to query the video length?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Peter</div><div class=""><br class=""></div><div class="">[0] <a href="https://trac.ffmpeg.org/ticket/1607" class="">https://trac.ffmpeg.org/ticket/1607</a></div></body></html>