Regulation 261/2004 applies to all flights within the EU, and flights to the EU by any EU airline. It does not apply to flights arriving the EU from outside the EU, that are operated by a non-EU airline.