[Libav-user] Is ticket #1607 (only AVSEEK_FLAG_ANY returns correct success ) still open? Can/Will it be addressed?

Peter Rennert mailinglists at rennert.io
Mon Sep 14 16:56:42 CEST 2015


Is there a way of knowing whether I seek outside of a video when using the SEEK_BACKWARD flag?

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.

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?


Is there maybe a function I have overlooked that I can call to query the video length?


Cheers,

Peter

[0] https://trac.ffmpeg.org/ticket/1607 <https://trac.ffmpeg.org/ticket/1607>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20150914/4e51347c/attachment.html>


More information about the Libav-user mailing list