avformat/mux: Check for and remove invalid packet durations