lavf: Add a flag to enable/disable per-packet flushing