avformat/hls: seek to last segment if beyond duration