Update to the current lavf API and fix memory leak when using --seek
Fix memory leak when using select_every filter