use flags field and remove key_frame field