1. A method to protect media flows against congestion losses, the method comprising: measuring congestion by delay samples; performing a dynamic Forward Error Correction (FEC) algorithm, including modeling loss events associated with the delay samples using convex hull clustering for loss-event classification, including determining an FEC rate according to the loss-event classification.