lwlibav: Support repeat flags.

Original patch by Masaki Tanaka <maki.rxrz@gmail.com>.