moved vlc_seek function outside of query